Skip to content

Commit

Permalink
avoid calling str on array (#1959)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgsavage authored May 12, 2024
1 parent 6be06c6 commit d28efac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pint/facets/plain/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class PlainQuantity(Generic[MagnitudeT], PrettyIPython, SharedRegistryObject):
def ndim(self) -> int:
if isinstance(self.magnitude, numbers.Number):
return 0
if str(self.magnitude) == "<NA>":
if str(type(self.magnitude)) == "NAType":
return 0
return self.magnitude.ndim

Expand Down

0 comments on commit d28efac

Please sign in to comment.