na is dead, long live np!

#4 Merged
Repository
scopatz
Branch
yt-3.0
Repository
yt_analysis
Branch
yt-3.0
Author
  1. Anthony Scopatz
Reviewers
Description

Updated all na aliases to be np instead. Added additional "import numpy as na" statement to yt/mods.py for backwards compatibility. Tested on my machine. This pull request brought to you by regular expressions.

Comments (4)

  1. MattT

    Hi Anthony,

    I wanted to just let you know that I'm going to look this over, but we might want to wait a bit before accepting this PR just so that we can reduce the overhead to merging bug fixes as they come up in the 2.x branch. I'll write back on Monday with thoughts after testing this out.

  2. Anthony Scopatz author

    No worries. I just did this because I was starting to type na elsewhere :). This took me two lines in bash. Will take me two lines to revert if needed. If preferred, I can do the same in the yt 2.x fork and then we could merge in the 2 -> 3 direction. Or feel free to ignore this PR as you see fit.

  3. Anthony Scopatz author

    Hah! So it does. I bet you that "ana.sinh" was supposed to be "na.asinh". And actually looking at this code now, I don't think that ComovingVolume() has any hope of working. There are several instances of other functions which are used (eg, asin) which are not accessed via na/np and are not independently imported. I am guessing that this is just broken.