Answers for "create an numpy array of an integer"

0

create an array of n same value python

>> import numpy as np

>> np.full(
    shape=10,
    fill_value=3,
    dtype=np.int)

array([3, 3, 3, 3, 3, 3, 3, 3, 3, 3])
Posted by: Guest on May-07-2020
0

np arange shape

np.arange(12).reshape(3,4)
Posted by: Guest on September-09-2020

Code answers related to "create an numpy array of an integer"

Python Answers by Framework

Browse Popular Code Answers by Language