Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quantities with structured units #11775

Merged
merged 57 commits into from
Aug 9, 2021
Merged

Commits on Jul 18, 2021

  1. Basic start of a StructuredUnit.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    1101e28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13ee02b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    766155c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf5a03d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b065087 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    86d3ee2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    17edc08 View commit details
    Browse the repository at this point in the history
  8. Add docstrings.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    55bb52a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b2175b4 View commit details
    Browse the repository at this point in the history
  10. Be a bit more careful with dtype and the recursive replacement.

    In particular, subarrays such as (3,4)f8 should be replaced in
    their entirety by 'O', so cannot really use the numpy.ma version.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    78e6c08 View commit details
    Browse the repository at this point in the history
  11. Rework so that StructuredUnit parts can be StructuredUnit.

    This makes it easier to recurse, especially in the initialization.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    cb6476f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f867750 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f47728b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    57fd702 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e458f55 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c5a3d0a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3994bd4 View commit details
    Browse the repository at this point in the history
  18. Introduce StructuredUnit multiplication and division.

    Including with structured array to get StructuredQuantity.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    9addda8 View commit details
    Browse the repository at this point in the history
  19. Fail on inconsistent units.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    674e100 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7715577 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    fd71c72 View commit details
    Browse the repository at this point in the history
  22. define (in)equality

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    ef94e71 View commit details
    Browse the repository at this point in the history
  23. Define __setitem__.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    1d377a5 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    1b7aaba View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    6c1f9cf View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    41c4d18 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    6ad9b2b View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    13ecc8b View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    7f43689 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    49887af View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    91a502f View commit details
    Browse the repository at this point in the history
  32. Make StructuredUnit its own class, rather than a subclass of np.void.

    Very little reason ever to use the np.void methods, and problem with
    override of __eq__ and __ne__.  This way, perhaps some factoring out
    of methods with UnitBase may be possible.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    e155cec View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    bcbda52 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    6e90646 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    420826d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    aa0013d View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    45111f1 View commit details
    Browse the repository at this point in the history
  38. Move all StructuredQuantity functionality in Quantity itself.

    So, one recognizes a structured Quantity simply from the unit.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    afd2052 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    5c5f3ac View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    0b4fa7d View commit details
    Browse the repository at this point in the history
  41. Make StructuredUnit also indexable by number.

    Simple to do by storing units in void.
    
    Also adjust the erfa quantity wrappers to become independent
    of field name -- although pyerfa itself does not yet support that.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    b474796 View commit details
    Browse the repository at this point in the history
  42. Add basic documentation.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    2e4a0d9 View commit details
    Browse the repository at this point in the history
  43. In erfa, can now import StructuredUnit on top.

    This since Quantity is no longer imported in structured.py
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    08793a6 View commit details
    Browse the repository at this point in the history
  44. Correct implementation of _normalize_tuples

    Plus tests and some cleanup.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    16664df View commit details
    Browse the repository at this point in the history
  45. Tests with structured MaskedQuantity.

    Plus a few small changes to ensure those work.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    1782e64 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    086a941 View commit details
    Browse the repository at this point in the history
  47. Changelog entry.

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    73bfbe7 View commit details
    Browse the repository at this point in the history
  48. Rename .names attribute to .field_names.

    This to avoid possible clash with UnitBase.names.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    aaf9f5e View commit details
    Browse the repository at this point in the history
  49. Allow passing in StructuredUnit for names.

    Also speed up case for dtype.  Plus cleanup and more documentation.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    9f0decd View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    40fb562 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    1fe39df View commit details
    Browse the repository at this point in the history
  52. Ensure structured SpecificTypeQuantity is possible.

    Turned out this needed a fix to how physical type IDs were returned,
    as a plain numpy.void gave a FutureWarning on comparisons, and
    is sensitive to names, which we do not want to be.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    1e90a2b View commit details
    Browse the repository at this point in the history
  53. Fix _repr_latex_

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    b1a151a View commit details
    Browse the repository at this point in the history
  54. Make .to(other) return the result for a value with all ones.

    And fix .items() to directly return a tuple, for nicer interactive viewing.
    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    cd30915 View commit details
    Browse the repository at this point in the history
  55. Ensure tests pass on pyerfa-dev

    mhvk committed Jul 18, 2021
    Configuration menu
    Copy the full SHA
    ad28c92 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    5055b82 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2021

  1. Configuration menu
    Copy the full SHA
    a8ef5af View commit details
    Browse the repository at this point in the history