Skip to content

genutil.statistics.mean does not exists #5

Description

@chaosphere2112

because MV2.average does pretty much the same thing

but this would allow to use nifty axis='t' or axis='xy' or axis='(my_axis_name)'

Migrated from: CDAT/cdat#1569

Activity

  1. added this to the 2.12 milestone on May 8, 2017
  2. self-assigned this
    on Sep 6, 2017
  3. modified the milestones: 3.0, 2.12 on Sep 6, 2017
  4. modified the milestones: 3.0, Next Release on Mar 29, 2018
  5. github-actions commented on Aug 27, 2020

    @github-actions

    Marking issue as stale, since there has been no activity in 30 days.

    Unless the issue is updated or the 'stale' tag is removed, this issue will be closed in 7 days.

  6. durack1 commented on Aug 27, 2020

    @durack1
    Member

    @jasonb5 this is related to the fact that cdms/cdutil etc all had their origin in numeric, before numpy and as numeric didn't include all the functionality that numpy now has, basic stats function were created and are now duplicated by the numpy variants, assuming numpy is wrapped correctly to expose all the functions. The MV2 library could mostly be deprecated in favour of numpy pure functions, or alternatively MV2 just calls the numpy functions directly (preserving the cdms transient variable attributes of course)

  7. jypeter commented on Aug 28, 2020

    @jypeter
    Member

    I totally agree with accessing numpy (more likely numpy.ma) with MV2, in order to preserve attributes would be very useful!

    It could be useful to add a new compute_history attribute to the variable specifying which function was applied, and append this if there is a pre-existing compute_history attribute (same way the history global attribute works in nc files)

    Because in some cases, the original name/units of the variable may not mean anything after applying the numpy function

  8. durack1 commented on Aug 28, 2020

    @durack1
    Member

    @jypeter another good idea, so similar to how nco operates with appending to the history global attribute with a summary of what was done.

    I am sure @pochedls will also have some ideas around this

  9. jasonb5 commented on Aug 28, 2020

    @jasonb5
    Contributor

    The MV2 module already wraps numpy.ma functions. I see there is an average but not mean in MV2, I can add this.

    As for history recording, we're planning on adding provenance support in the next-gen CDMS2.

  10. durack1 commented on Aug 28, 2020

    @durack1
    Member

    @jasonb5 thanks for the update, when we talked about this a long time ago, I was suggesting that removing the duplication in MV2 by rather wrapping all the numpy.ma functions was a good idea, which means that if numpy.ma adds another function (or bugfix) we get this in CDMS for free with no maintenance overhead for you folks

  11. jasonb5 commented on Aug 28, 2020

    @jasonb5
    Contributor

    Ah I see what you mean, this is inline with the next-gen CDMS where MV2 will be absorbed into the Variable class. As this would be a fairly large change for the current implementation, we'll handle it in the next.

  12. durack1 commented on Aug 28, 2020

    @durack1
    Member

    Perfect, that sounds like we're on the same page here

  13. github-actions commented on Sep 27, 2020

    @github-actions

    Marking issue as stale, since there has been no activity in 30 days.

    Unless the issue is updated or the 'stale' tag is removed, this issue will be closed in 7 days.

  14. added
    kind/featureCategorizes issue as related to feature request
    and removed on Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue as related to feature request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions