Soumya
Soumya

Reputation: 5412

ImportError: No module named array_import -----scipy

I am facing problem with importing io module in scipy and python shell shows an error as following.

import scipy.io.array_import

ImportError: No module named array_import

Please let me know how to solve this.

By reading some post on net I also tried using

import numpy.loadtxt  

but that too doesnt work

ImportError: No module named loadtxt

Upvotes: 0

Views: 4312

Answers (2)

Dave Everitt
Dave Everitt

Reputation: 17876

See this message on the SciPy user mailing list:

I am facing problem with importing io module in scipy and python shell shows an error as following.

import scipy.io.array_import
ImportError: No module named array_import

array_import was removed in Scipy 0.8. If you are looking for read_array and write_array, you should use numpy.savetxt and numpy.loadtxt instead.

Upvotes: 1

unutbu
unutbu

Reputation: 879749

numpy.loadtxt is a function, not a module. That's why you can't import loadtxt:

In [33]: import numpy
In [34]: numpy.loadtxt
Out[34]: <function loadtxt at 0x9f8bca4>

Upvotes: 0

Related Questions