Answers for "Python NumPy require Function Example with requirements attribute"

0

Python NumPy require Function Example with requirements attribute

# welcome to softhunt.net
import numpy as np

# Python program explaining
# numpy.require()
data = np.arange(9).reshape(3, 3)
b = np.require(data, dtype=np.float32,
			requirements=['A', 'W', 'O', 'C'])
print(data)
print(b.flags)
Posted by: Guest on April-24-2022

Code answers related to "Python NumPy require Function Example with requirements attribute"

Python Answers by Framework

Browse Popular Code Answers by Language