How to create matrix with numpy in Python

1 Answer

0 votes
import numpy

arr = numpy.matrix('1 2 3; 4 5 6')

print(arr)


'''
run:

[[1 2 3]
 [4 5 6]]

'''

 



answered Jan 20, 2019 by avibootz

Related questions

1 answer 243 views
1 answer 194 views
2 answers 258 views
1 answer 350 views
1 answer 276 views
...