Question: Consider this sequence of float-type values: 3.25, 2.5, 1.75, 1.0, 0.25, -0.5, -1.25, -2.0 For the questions below, assume the following line has already been
Consider this sequence of float-type values:
3.25, 2.5, 1.75, 1.0, 0.25, -0.5, -1.25, -2.0
For the questions below, assume the following line has already been defined: import numpy as np
a) In a single line of code, create an array containing exactly those values by using a NumPy function and assign the result to a variable named m. Hint: Look carefully at the values to see if there is a pattern.
Note: Do NOT use the NumPy array() function. There are better NumPy functions to choose from.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
