On 29/09/11 19:45, Mateusz Paprocki wrote:
Hi,

On 29 September 2011 04:52, Torquil <[email protected]
<mailto:[email protected]>> wrote:

    Hi everybody!

    What is the simplest way of constructing e.g. a (2,3,4)-shaped numpy
    array containing sympy zeros?


The simplest, but maybe not the most efficient is:

In [1]: import numpy as np

In [2]: a = S.Zero*np.zeros((2, 3, 4))


Thanks, I'm mostly going for simplicity of code, not necessarily efficiency. This one is very nice!


btw. 0.6.7 is a very old version of SymPy. The newest is 0.7.1.

Using 0.7.1 now. Thanks!

Best regards
Torquil Sørensen

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to