GithubHelp home page GithubHelp logo

Comments (2)

boada avatar boada commented on August 13, 2024

If I leave everything as is, I still get the same issue. This time with python2.7.


IndexError Traceback (most recent call last)
in ()
----> 1 model = ezgal.model('/home/boada/Projects/BC2003/bc03/newiseds/1_0gyr_hr_m62_salp.ised')

/home/boada/.local/lib/python2.7/site-packages/ezgal/ezgal.pyc in init(self, model_file, is_ised, is_fits, is_ascii, has_masses, units, age_units, skip_load)
207 has_masses=has_masses,
208 units=units,
--> 209 age_units=age_units)
210
211 #####################

/home/boada/.local/lib/python2.7/site-packages/ezgal/ezgal.pyc in _load(self, model_file, is_ised, is_fits, is_ascii, has_masses, units, age_units)
247 # test for a bruzual-charlot binary ised file
248 if model_file[len(model_file) - 5:] == '.ised' or is_ised:
--> 249 self._load_ised(self.filename)
250 else:
251 # And then the rest.

/home/boada/.local/lib/python2.7/site-packages/ezgal/ezgal.pyc in _load_ised(self, file)
2507
2508 # read ised file
-> 2509 (seds, ages, vs) = utils.read_ised(file)
2510
2511 # store ages

/home/boada/.local/lib/python2.7/site-packages/ezgal/utils.pyc in read_ised(file)
475 sinds = vs.argsort()
476
--> 477 return (seds[sinds, :], ages, vs[sinds, :])

IndexError: too many indices for array

from easygalaxy.

boada avatar boada commented on August 13, 2024

It seems the problem is in this line

return (seds[sinds, :], ages, vs[sinds, :])

vs is a 1d array, so the ,: bit is causing the problem. If you remove that bit and just return return (seds[sinds, :], ages, vs[sinds]) then I am getting NaNs everywhere when I try to calculate things.

from easygalaxy.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.