How to create 2D float array with numpy in Python

1 Answer

0 votes
import numpy

arr = numpy.array([[3.14, 1.3, 4.2], [5.6, 1.74, 9.7]])

print(arr)


'''
run:

[[3.14 1.3  4.2 ] 
 [5.6  1.74 9.7 ]]

'''

 



answered Jan 20, 2019 by avibootz

Related questions

1 answer 171 views
1 answer 161 views
1 answer 257 views
2 answers 288 views
3 answers 329 views
...