1
votes

Ran into this error once updating to scipy 0.19 when trying to call interpnd():

def __init__(self,m_ini,age,feh,m_act,logL,Teff,logg,mags,tri=None,
             minage=None, maxage=None, ext_table=False):

    self.minage = age.min()
    self.maxage = age.max()
    self.minmass = m_act.min()
    self.maxmass = m_act.max()
    self.minfeh = feh.min()
    self.maxfeh = feh.max()

    self.ext_table = ext_table

    if minage is not None:
        self.minage = minage
    if maxage is not None:
        self.maxage = maxage

    L = 10**logL

    if tri is None:
        points = np.zeros((len(m_ini),3))
        points[:,0] = m_ini
        points[:,1] = age
        points[:,2] = feh
        fn = interpnd(points,m_act)
        self.tri = fn.tri
    else:
        self.tri = tri
        self.mass = interpnd(self.tri,m_act)

    self._data = {'mass':m_act,
                'logL':logL,
                'logg':logg,
                'logTeff':np.log10(Teff),
                'mags':mags}
    self._props = ['mass', 'logL', 'logg', 'logTeff']

    self.bands = mags.keys()

    self._mag = {band:interpnd(self.tri,mags[band]) for band in self.bands}

    d = {}
    for b in self._mag.keys():
        d[b] = self._mag_fn(b)

    self.mag = d

Error message:

Traceback (most recent call last):
  File "/Users//anaconda/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/Users//anaconda/lib/python3.6/site-packages/nose/loader.py", line 417, in loadTestsFromName
addr.filename, addr.module)
  File "/Users//anaconda/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/Users//anaconda/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/Users//anaconda/lib/python3.6/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/Users//anaconda/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 675, in _load
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/Users//isochrones/isochrones/tests/tests.py", line 11, in <module>
    DAR = Dartmouth_Isochrone()
  File "/Users//isochrones/isochrones/dartmouth/isochrone.py", line 89, in __init__
**kwargs)
  File "/Users//isochrones/isochrones/isochrone.py", line 145, in __init__
    self.mass = interpnd(self.tri,m_act)
  File "scipy/interpolate/interpnd.pyx", line 243, in scipy.interpolate.interpnd.LinearNDInterpolator.__init__ (scipy/interpolate/interpnd.c:5484)
  File "scipy/interpolate/interpnd.pyx", line 71, in scipy.interpolate.interpnd.NDInterpolatorBase.__init__ (scipy/interpolate/interpnd.c:2621)
  File "scipy/spatial/qhull.pyx", line 1910, in scipy.spatial.qhull.Delaunay.points (scipy/spatial/qhull.c:18892)
AttributeError: 'Delaunay' object has no attribute '_points'`

Raised an issue on Github but to no response. This issue was not occurring before I updated, but now even when I downgrade to scipy 18.1 the issue still occurs. I also tried uninstalling scipy and reinstalling it and this did not work either.

1
It is impossible to reproduce with the code you have given. Can you edit the post to produce a copy-pastable working example? - Pierre de Buyl
The code I posted is from a package called isochrones and was just the example I chose to use because I've never actually called interpnd before. The error posted is from using nosetests isochrones in the terminal, which easily shows the error output. I can either post a simpler code of me calling the isochrones package, or I can post a simple call of interpnd/qhull - Austin
I've found that there was a compatibility issue between the isochrones package and the new scipy package. The issue was resolved by the package creator. - Austin

1 Answers

0
votes

I've found that there was a compatibility issue between the isochrones package and the new scipy package. The issue was resolved by the package creator.