Code Monkey home page Code Monkey logo

Comments (6)

paulray avatar paulray commented on August 16, 2024

This may be related to this issue in astropy: astropy/astropy#4098

from pint.

paulray avatar paulray commented on August 16, 2024

Jing reports that this issue does not occur when using numpy 1.8.

from pint.

luojing1211 avatar luojing1211 commented on August 16, 2024

I ran my test. It returns a different issue.

INFO: Reading toas from 'examples/NGC6440E.tim.pickle.gz'...
 [pint.toa]
Traceback (most recent call last):
  File "examples/fit_NGC6440E.py", line 21, in <module>
    rs = pint.residuals.resids(t, m).phase_resids
  File "/Users/jingluo/Research_codes/PINT/pint/residuals.py", line 12, in __init__
    self.chi2 = self.calc_chi2()
  File "/Users/jingluo/Research_codes/PINT/pint/residuals.py", line 52, in calc_chi2
    return ((self.time_resids / self.toas.get_errors()).decompose()**2.0).sum()
  File "/Users/jingluo/anaconda/lib/python2.7/site-packages/astropy-1.1.dev13975-py2.7-macosx-10.5-x86_64.egg/astropy/units/quantity.py", line 842, in __div__
    return self.__truediv__(other)
  File "/Users/jingluo/anaconda/lib/python2.7/site-packages/astropy-1.1.dev13975-py2.7-macosx-10.5-x86_64.egg/astropy/units/quantity.py", line 821, in __truediv__
    return super(Quantity, self).__truediv__(other)
ValueError: operands could not be broadcast together with shapes (62,) (0,)

There is no data in the pickle file.

from pint.

vhaasteren avatar vhaasteren commented on August 16, 2024

Can we confirm that this is solved? For me, with the development version of Astropy, and numpy 1.10.1 it is no longer an issue.

from pint.

scottransom avatar scottransom commented on August 16, 2024

This should be fixed on all platforms with the latest astropy. I think that the fix is in the new release candidate for v1.1

from pint.

paulray avatar paulray commented on August 16, 2024

I finally got a chance to test it on my Mac with the dev version of astropy. Test runs fine now. Closing...

from pint.

Related Issues (20)

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.