Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve the following problems with numpy arrays. Problems: Array Creation == 1. Create the numpy array fibo with the integers 0,1,1,2,3,5. 2. Create the numpy

Solve the following problems with numpy arrays. Problems:

Array Creation ==

1. Create the numpy array fibo with the integers 0,1,1,2,3,5.

2. Create the numpy array a with dimensions 4, 3, and 5 and filled with the integers 1 to 60 in such a way that a[0, 0] array([1, 2, 3, 4, 5]) and a[:, 0, 0] == array([ 1, 16, 31, 46]).

3. Create the numpy array b with 100 equally spaced values between -5T and +5r.

4. Create the numpy array c with the powers of 10 over 30 decades, starting from 10-15, i.e., 10-15, 10-14, 1014 1015

Problems: Working with Arrays

Given the array r = np.linspace(0, 10, num=30) compute

1. The array r1 formed by dividing all elements in r by the scalar 2.

2. The array r2 of length len(r)-1 that contains the volumes of spherical shells at the radii r, namely r,2) = a mot1 - 4 mm with 0

Given the array q = np.array([[-100, 200, -300, 400], [10, -20, 30, -40], [1, 2, 3, 4]]), compute and assign to the given variable

1. the sums by rows as q1 (i.e., summing over the columns)

2. the sums by columns except the last one as q2 (i.e., summing over rows)

3. the minimum of the array as q3

4. the minima by rows as q4

5. the mean of the sub-array formed by omitting the last two rows and columns as q5

6. the products over the rows in the last two columns as q6

7. the array formed by taking the natural logarithm of the absolute value of each element, In 93,j | as 7

8. the transpose of q as q8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Android 4 Application Development

Authors: Reto Meier

3rd Edition

1118223853, 9781118223857

More Books

Students also viewed these Programming questions