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

add ignore_nan option to median_absolute_deviation #5232

Merged
merged 1 commit into from
May 16, 2017

Commits on May 15, 2017

  1. Add ignore_nan option to mad_std

    (this is a squash of 38 commits with messages below:)
    
    make mad_std nan-compatible
    
    mad_std too
    
    add changelog entry
    
    np->numpy in docstrings & check numpy version (using 1.9, because
    officially it was added to numpy then according to their docs...)
    
    use astropy.utils.compat (thanks @bsipocz)
    
    1_9, not 1P9
    
    bump to 1.10 to avoid np 1.9 weirdness
    
    attempt to work around older numpy versions using ma.median
    
    add tests for scalarness and use np.ma.median except when axis=None.
    Also, change 'a' to 'data'.  'a' is a bad variable name and led to a few
    mistakes
    
    add another test of madstd with nan & axes
    
    add a warning about NaNs in arrays for np<1.10.  Remove a test for those
    versions.
    
    update docstrings & changelog.  Add deprecation of old argument
    
    correct the code to match the comment
    
    change order of bool checking to do expensive one last
    
    Test appropriate numpy versions, check warnings, and use asked array comparison
    
    switch to catch_warnigns
    
    for numpy 1.13, treatment of NaNs in masked arrays changed
    
    add GE_13 to __ALL__
    
    xfail the masked array test to avoid supporting incorrect behavior
    see
    astropy#5232 (review)
    
    udpate the special cases as per @mwcraig's helpful chart!
    
    fix the tests: the behavior of the function when given masked arrays vs
    non-masked arrays has changed: we're now forcing the correct behavior
    for earlier versions
    
    implement @juliantaylor's  suggetions
    
    test should no longer use np.ma.allclose (though I don't know why ma
    wouldn't just work....)
    
    this commit will fail: I've fixed the underlying issue but kept the
    tests flexible using the wrong data type...
    
    tests for array type
    
    double backticks
    
    a second instance of bacticks
    
    had a case wrong: one of the warn cases should *not* return a NaN for
    np<1.11 (which is why we're catching a warning there)
    
    numpy 1.10 np.ma.median([1,2,nan,4,5]) returns nan by default
    
    no more old numpy supports.  Mixed feelings about this
    
    fix an import
    
    cleanup to address the numpy <=1.8 deprecation
    
    more cleanup
    
    fix changelog
    
    add a note about keepdims
    
    whitespace fix
    
    fix imports
    
    trailing whitespace?!!?!?!
    keflavich committed May 15, 2017
    Configuration menu
    Copy the full SHA
    e96efa7 View commit details
    Browse the repository at this point in the history