Note that there are some explanatory texts on larger screens.

plurals
  1. POnumpy load raises "AttributeError: 'module' object has no attribute 'expr'"
    primarykey
    data
    text
    <p>I try to run</p> <pre><code>#!/usr/bin/env python import os from numpy import * b= ones((3, 3)) print b save('fff', b) a = load('fff.npy') print a.shape print 'fertig' </code></pre> <p>but it raises:</p> <pre><code>Traceback (most recent call last): File "savetest.py", line 9, in &lt;module&gt; a = load('fff.npy') File "/usr/lib/python2.6/dist-packages/numpy/lib/io.py", line 195, in load return format.read_array(fid) File "/usr/lib/python2.6/dist-packages/numpy/lib/format.py", line 353, in read_array shape, fortran_order, dtype = read_array_header_1_0(fp) File "/usr/lib/python2.6/dist-packages/numpy/lib/format.py", line 250, in read_array_header_1_0 d = safe_eval(header) File "/usr/lib/python2.6/dist-packages/numpy/lib/utils.py", line 840, in safe_eval ast = compiler.parse(source, "eval") File "/usr/lib/python2.6/compiler/transformer.py", line 53, in parse return Transformer().parseexpr(buf) File "/usr/lib/python2.6/compiler/transformer.py", line 132, in parseexpr return self.transform(parser.expr(text)) AttributeError: 'module' object has no attribute 'expr' </code></pre> <p>I tried the example from <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.load.html" rel="noreferrer">docs.scipy.org</a> it raises the same error in my terminal, but it works in my ERIC python IDE. The Internet provides no for me understandable or transferable solution at this time.</p> <p>Finally, does anyone see the error in my code or approach and is able to provide a solution for it?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload