Hi !
I know there are other treads, but none of them brought the solution.
I’m having troubles importing numpy.
When I import it in a console, it works perfectly, but I keep getting an error in blender.
Could anyone help ?
Thanks !
Hi !
I know there are other treads, but none of them brought the solution.
I’m having troubles importing numpy.
When I import it in a console, it works perfectly, but I keep getting an error in blender.
Could anyone help ?
Thanks !
here is one way
import numpy as np
from numpy import array,angle,conj,arange,matrix,ones, zeros ,random, dot
from numpy import dtype
from numpy import linalg as LA
print ()
print (’ Structured arrays ')
x= np.array( [ (1, 2.0,‘Hello’) , (2, 3.0, “World”) ],
dtype=[(‘foo’,‘i4’ ), ( ‘bar’,‘f4’ ), (‘baz’ ,‘S10’ ) ] )
print ( 'x = ',x )
print ()
&&&&& or like this
import numpy as np
z = np.arange(3, dtype=np.float64)
print ()
print (’ z =’, z)
x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)
print (‘x =’,x)
print ( ‘type(x) =’,type(x) )
print ( ‘x.shape =’,x.shape )
print ( ‘x.dtype =’, x.dtype)
happy nl
This shouldn’ t happen. it’s weird. which Os are you using? as i can see from the console it seems linux. Do you installed blender in the system?