vhernandez / jwsProcessor

A program to convert and process Jasco SpectraManager (JWS) files.
https://sites.google.com/site/victorhr02/jwsprocessor
GNU General Public License v2.0
11 stars 4 forks source link

numpy.oldnumeric has been removed #3

Open eadsjr opened 9 years ago

eadsjr commented 9 years ago

When importing main directly I found oldnumeric did not work.

$ python main.py
Traceback (most recent call last):
  File "main.py", line 17, in <module>
    from selection_page import SelectionPage
  File "/Users/jreads/ExternalProjects/jwsProcessor/src/jwsprocessor/selection_page.py", line 8, in <module>
    from tools import SpectraDB, _
  File "/Users/jreads/ExternalProjects/jwsProcessor/src/jwsprocessor/tools.py", line 9, in <module>
    from numpy.oldnumeric import array, arange, Float
ImportError: No module named oldnumeric

Apparently it has been removed from numpy. I would've hoped the ImportError handling would've noticed this, if this is any kind of standard:

>>> numpy.__version__
'1.9.2'

>>> numpy.oldnumeric
'removed'

The error message went away with the following change in "tools.py":

# from numpy.oldnumeric import array, arange, Float
from numpy import array, arange

It is not entirely clear that this still works as expected, but the error message goes away.

vhernandez commented 9 years ago

I have removed all references to oldnumeric and updated the code. It should be fixed now. Thanks a lot for reporting.

idikiy commented 8 years ago

Hi Victor,

I just downloaded the repository for jwsProcessor 0.2.0 today and still had the references to oldnumeric in tools.py, smoothing_selection.py, and jws_filechooser.py. It seems to work after I removed them.