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.

Angles should be comparable/sortable

See original GitHub issue
Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from skyfield.units import Angle
>>> Angle(degrees=10) > Angle(degrees=5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: '>' not supported between instances of 'Angle' and 'Angle'

This should return True correct? Or is there some weird Angle logic that makes that not possible? Skyfiel 1.26 installed with pip3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
glangfordcommented, Aug 2, 2020

@rory If sorting a set of Angle objects was the goal,

>>> x = [Angle(degrees=10), Angle(degrees=1), Angle(degrees=5)]
>>> x.sort(key=lambda a:a.degrees)
>>> x
[<Angle 01deg 00' 00.0">, <Angle 05deg 00' 00.0">, <Angle 10deg 00' 00.0">]
>>> 

https://stackoverflow.com/questions/403421/how-to-sort-a-list-of-objects-based-on-an-attribute-of-the-objects

0reactions
brandon-rhodescommented, Dec 15, 2021

As this has been idle for more than a year, I’m going to hope that users are getting along fine by comparing or sorting degrees or radians as appropriate. I’ll be happy to hear more ideas or problems here on the issue, though, so feel free to comment in the future despite its being closed. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Smerity (@Smerity) / Twitter
You ask a game dev “Can the player summon a giant demon that bursts from the ground in an ... Multifinger, angle and...
Read more >
Determining Which Angles in a Triangle Must be Less Than a ...
Video Transcript. In the given figure, which angles must have smaller measures than the measure of angle one? In this example, we need...
Read more >
the face of what came after: memorialization of september 11
and their “shells,” but framing distinguishes between issues and frames: One issue can be covered from multiple angles or frames, ...
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