# python-scipyHow do I create a numpy array of zeros using Python?

Creating a numpy array of zeros using Python is simple. To do this, the `numpy`

library must be imported.

`import numpy as np`

Then, a numpy array can be created using the `zeros`

function, passing in the desired shape of the array as an argument. For example, to create an array of zeros with a shape of (2,3):

```
arr = np.zeros((2,3))
print(arr)
```

## Output example

```
[[0. 0. 0.]
[0. 0. 0.]]
```

The code can be broken down as follows:

`import numpy as np`

imports the`numpy`

library, and assigns it the alias`np`

for easy access.`arr = np.zeros((2,3))`

creates a numpy array of zeros with a shape of (2,3) and assigns it to the variable`arr`

.`print(arr)`

prints the array to the console.

For more information, see the Numpy Documentation.

### More of Python Scipy

- How do I create a 2D array of zeros using Python and NumPy?
- How do I use Python Scipy to perform a Z test?
- How can I use Python and SciPy to read and write WAV files?
- How do I calculate a Jacobian matrix using Python and NumPy?
- How do I use Python XlsxWriter to write a NumPy array to an Excel file?
- How do I use the scipy ttest_ind function in Python?
- How can I use scipy linalg in Python?
- How can I use Python Scipy to solve a Poisson equation?
- How can I use the Radial Basis Function (RBF) in Python with SciPy?
- How can I use Python and SciPy to manipulate vectors?

See more codes...