'numpy'에 해당되는 글 2

  1. 2009.01.29 dimension of matrix ( or array )
  2. 2009.01.29 create array in numpy
Programming/Python | Posted by 알 수 없는 사용자 2009. 1. 29. 22:27

dimension of matrix ( or array )

>>> U = random.rand ( 200, 20 )
>>> shape ( U )
( 200, 20 )

>>> size ( U ) #return total element of the matrix ( array )
4000
Programming/Python | Posted by 알 수 없는 사용자 2009. 1. 29. 22:23

create array in numpy

array ( sequence, dtype = None, copy = True, order = None, subok = True, ndmin=True )
>>> from numpy import *
>>> a = array ( [ 1, 2, 3 ], dtype = float )
>>> a
array ( [ 1., 2., 3. ] )