subject
Computers and Technology, 19.10.2021 04:00 binu

Creating a Numpy Array The core datatype of NumPy is the NumPy Array. NumPy Arrays build on the basic Python List datatype to add functionality for vector math and common statistical calculations. The easiest way to create a NumPy Array is to first create a List and then passing it as the argument to the np. Array() constructor. In this exercise, you'll create some NumPy arrays, and then perform some simple operations on them.
Resources
Creating a NumPy Array
NumPy Array Shape
Sorting a NumPy Array
Instructions:
Create a 1-dimensional Array, named my_arr containing the elements [9, 8, 7, 6, 5, 4, 3, 2, 1].
Print the shape of my_arr.
Create a 2-dimensional Array, named my_mat containing rows, each containing a copy of my_arr.
Print the shape of my_mat.
Create a new Array named my_prod and use it to store the result of the operation my_arr * my_arr.
Print out my_prod.
Use the np. sort function to sort my_prod and store the result in a new Array named my_prod_sorted.
Print out my_prod_sorted.
Exercise 1 Code Goes Here
(9.)
(3,9)
[81 64 49 36 25 16 94 1]
[14 9 16 25 36 49 64 81)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
question
Computers and Technology, 22.06.2019 04:00
Chloe is building a kiosk-based excel application. she wants to make some modifications to the screen elements in order to keep users from being distracted by parts of the application that are irrelevant to her application. she turns to henry for guidance as she knows he built a similar solution earlier this year.chloe has decided to hide the worksheet gridlines and the vertical scroll bar. what does henry tell her to use to do this? a) screen elements dialog boxb) display options dialog boxc) customization dialog boxd) excel options dialog box
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
You know the right answer?
Creating a Numpy Array The core datatype of NumPy is the NumPy Array. NumPy Arrays build on the ba...
Questions
question
Mathematics, 12.11.2020 07:00
question
Biology, 12.11.2020 07:00
question
Mathematics, 12.11.2020 07:00
question
Mathematics, 12.11.2020 07:00
question
Mathematics, 12.11.2020 07:00
question
Mathematics, 12.11.2020 07:00
Questions on the website: 13722367