The purpose of this project, creating is to one-dimensional array or two-dimensional array with user interaction.
For code explain.
In this exercise, I have specified methods that can be used to create arrays with the python numpy library.
I mention seven functions you can use to create a numpy array in this exercise. These functions are shown below.
- np.zeros()
- np.ones()
- np.full()
- np.arange()
- np.linspace()
- np.random.normal()
- np.random.randint()
You can find explanations and examples of functions in this exercise.
The purpose of this exercise is to find integer values received from the user in a randomly generated numpy array.
The program gives the following output:
- The numpy list as generated randomly.(It is set to create an array with a maximum of 100 rows, 100 columns and 100 elements.)
- Cell numbers of searched integer value.
- Row and column numbers of randomly generated array.
- How many times the searched integer value repeated in the array.
In this exercise I showed how to perform four operations in numpy arrays.
Methods I use for this are show below:
- np.sum()
- np.subtract()
- np.multiply()
- np.divide()