question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `to` in uncertainty

See original GitHub issue

Prompted by a question from @parejkoj, I noticed the current behavior

>>> from astropy import uncertainty as unc
>>> from astropy import units as u
>>> flux = unc.normal(100*u.AB, std=1*u.AB, n_samples=10000)
>>> flux.to(u.MagUnit(u.AB))
ValueError: Value not scalar compatible or convertible to an int, float, or complex array

It really would be better if that worked as expected, because that’s basically all that’s needed for magnitude/flux error propagation using the canonical machinery in astropy for this.

The broader problem seems to be that any to method-call yields this same error though, so I think this may be a bug…?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
astrofrogcommented, Jun 17, 2019

Also we should make sure to_value works

0reactions
mhvkcommented, Oct 28, 2019

fixed by #9429 and #9442

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Support the People You Lead in Times of Uncertainty
You can help others tap into hope by asking them what is possible now that wasn't as likely before. H also refers to...
Read more >
5 ways to support your team through uncertainty
5 ways to support your team through uncertainty · 3. Communicate, even when you don't have an update · 4. Lean into recognition...
Read more >
Dealing with Uncertainty
Like all emotions, if you allow yourself to feel fear and uncertainty, they will eventually pass. Focus on the present moment and your...
Read more >
7 strategies to help you live with uncertainty |
1. Don't resist · 2. Invest in yourself · 3. Find healthy ways to comfort yourself · 4. Don't believe everything you think...
Read more >
10 Ways to Support Teams During Uncertainty
1. Create Certainty ... Help others to accept change by creating certainty during uncertain times. Be open and transparent about what is happening ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found