Skip to content

Commit

Permalink
Simplify conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Oct 24, 2023
1 parent 90724c3 commit f3589b6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scico/numpy/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,4 @@ def is_scalar_equiv(s: Any) -> bool:
``True`` if the object is a scalar or a singleton array,
otherwise ``False``.
"""
return (
snp.isscalar(s)
or isinstance(s, jax.core.Tracer)
or (isinstance(s, jax.Array) and s.ndim == 0)
)
return snp.isscalar(s) or (isinstance(s, jax.Array) and s.ndim == 0)

0 comments on commit f3589b6

Please sign in to comment.