Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python numpy.flatiter function Example

# welcome to softhunt.net
# Python Program illustrating
# working of ndarray.flat()

import numpy as np

# Working on 1D iteration of 2D array
array = np.arange(15).reshape(5, 3)
print("2D array : 
",array )

print("
ID array : 
", array.flat[0:15])		

print("
Type of array,flat() : ", type(array.flat))

for i in array.flat:
	print(i, end = ' ')
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #function #Example
ADD COMMENT
Topic
Name
4+7 =