I’m encountering a challenge with probes. In my setup, it’s easier to run a python script instead of running a Jupyter notebook. The probe data is saved using the
np.save (Numpy), and then import it later and create plots by accessing the data with
I have no issues doing this with an SPA State module. Here is a small snippet of this.
p_inputOut = nengo.Probe(input0.output, synapse=0.01) np.save((logPath+fileName),spa.similarity(sim.data[p_inputOut], vocab))
p_inputOut = np.save(logPath+fileName) # load in another file`
To note, the logPath+fileName will create a unique filename stored in a Numpy format.
I’m having issues doing the same thing with a neuron ensemble. An example is the snippet below.
p_mtr_speed = nengo.Probe(motor, synapse=0.01) np.save((logPath+"mtrSpeed_turtlebotFull"),p_mtr_speed) p_mtr_speed = np.load(logPath+fileName) # load in another file
At first I received an error regarding allowing pickles. I changed
p_mtr_speed = np.load(logPath+fileName) to
p_mtr_speed = np.load(logPath+fileName, allow_pickle=True). This addressed the first issue.
I’m stuck on this error:
AttributeError: Can't get attribute 'ScatteredHypersphere' on <module 'nengo.dists' from 'C:\\Program Files\\Python37\\lib\\site-packages\\nengo\\dists.py'> It appears to be related to the pickle as understand from the error tracking on
return format.read_array(fid, allow_pickle=allow_pickle, pickle_kwargs=pickle_kwargs) found in
**~\AppData\Roaming\Python\Python37\site-packages\numpy\lib\npyio.py** in load**(file, mmap_mode, allow_pickle, fix_imports, encoding)**
I’m not sure how to address this. Any suggestions?