DeveloperBreeze

Create a NumPy 1D Array

The following Python code demonstrates how to create a one-dimensional array using NumPy:

import numpy as np

# Create a 1D array
arr = np.array([1, 2, 3, 4, 5])
print(arr)

Continue Reading

Handpicked posts just for you — based on your current read.

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!