Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #NumPy #require #Function #Example #requirements #attribute
ADD COMMENT
Topic
Name
9+8 =