AttributeError: 'module' object has no attribute 'nanmean'

682 views
Skip to first unread message

liang huang

unread,
Sep 29, 2017, 6:21:48 AM9/29/17
to SpiNNaker Users Group
Hi everyone,

System: Linux
File: Introlab/synfire/synfire.py

When I try to run python synfire.py, I got an error 

AttributeError: 'module' object has no attribute 'nanmean' .

Here is the traceback:

Traceback (most recent call last):
  File "/home/mbax3lh2/spinnaker/IntroLab/synfire/synfire.py", line 4, in <module>
    import spynnaker8 as sim
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/spynnaker8/__init__.py", line 5, in <module>
    from pyNN import common as pynn_common
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/pyNN/common/__init__.py", line 47, in <module>
    from .populations import IDMixin, BasePopulation, Population, PopulationView, Assembly, is_conductance
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/pyNN/common/populations.py", line 22, in <module>
    from pyNN import random, recording, errors, standardmodels, core, space, descriptions
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/pyNN/recording/__init__.py", line 19, in <module>
    import neo
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/neo/__init__.py", line 11, in <module>
    from neo.core import *
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/neo/core/__init__.py", line 39, in <module>
    from neo.core.recordingchannel import RecordingChannel
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/neo/core/recordingchannel.py", line 13, in <module>
    import quantities as pq
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/quantities/__init__.py", line 276, in <module>
    from . import quantity
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/quantities/quantity.py", line 113, in <module>
    class Quantity(np.ndarray):
  File "/home/mbax3lh2/.local/lib/python2.7/site-packages/quantities/quantity.py", line 633, in Quantity
    @with_doc(np.nanmean)
AttributeError: 'module' object has no attribute 'nanmean'

Anyone know how to fix it?

Thanks
Liang Huang

Christian Brenninkmeijer

unread,
Sep 29, 2017, 6:41:49 AM9/29/17
to liang huang, SpiNNaker Users Group
Hi Liang,

I suspect that you have an older version of quantities with a new version of numpy.

Please make sure that you quantities package is the latest which is 0.12.1

Older versions of quantities should work with numpy 1.12.1 but that is NOT the recommended solution.

Christian

From: liang huang [huanglian...@gmail.com]
Sent: Friday, September 29, 2017 11:21 AM
To: SpiNNaker Users Group
Subject: [SpiNNaker Mailing List] AttributeError: 'module' object has no attribute 'nanmean'

--
You received this message because you are subscribed to the Google Groups "SpiNNaker Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spinnakeruser...@googlegroups.com.
To post to this group, send email to spinnak...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages