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 11:30
Hassan is writing his master’s thesis, which is a thirty-page document. he received some feedback from his professor in the form of comments, but does not see where the comments are. what is the fastest way for hassan to find the feedback?
Answers: 3
question
Computers and Technology, 24.06.2019 11:00
In three to five sentences, describe how you can organize written information logically and sequentially
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
question
Computers and Technology, 25.06.2019 00:30
Which of these serves as a bridge between the programming team and the audio team?
Answers: 2
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, 20.12.2019 09:31
question
Mathematics, 20.12.2019 09:31
Questions on the website: 13722360