Plasmapy: Standardize import alias for astropy.units as u

Created on 26 Jan 2018  路  4Comments  路  Source: PlasmaPy/PlasmaPy

There are some places in PlasmaPy where we use:

from astropy import units as u

and other places where we use

from astropy import units

As @StanczakDominik and others have pointed out on Matrix, it would be helpful to have one single alias for astropy.units that used uniformly throughout the code so that it's more consistent and readable. In the discussion on Matrix, the preference from a few people was to use u for brevity. This issue is to go through the code and replace occurrences of from astropy import units and units. with from astropy import units as u and u., including in examples in docstrings.

Thank you!
-Nick

Documentation low Good first contribution Help wanted

Most helpful comment

I'm also quite okay with going for from astropy import units as u.

All 4 comments

I'm also quite okay with going for from astropy import units as u.

Hi @namurphy,

Sorry for not announcing I was going to work on this beforehand. I think this PR should update those aliases: https://github.com/PlasmaPy/PlasmaPy/pull/243

Let me know if there are any issues. Also, can you give me any good resources for learning about Plasma physics. I'd like to know a little bit about the domain if I'm going to contribute to some of the tougher issues. Thanks.

Thank you, @nurbu5! Everything looked good so I merged it.

With respect to resources on learning about plasma physics, I'm most familiar with textbooks like _Introduction to Plasma Physics_. There's also an edX online course on plasma physics, though I haven't gone through it myself.

The edx course is neat, I can recommend it. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

namurphy picture namurphy  路  5Comments

lemmatum picture lemmatum  路  6Comments

rocco8773 picture rocco8773  路  4Comments

Griffintaur picture Griffintaur  路  5Comments

ritiek picture ritiek  路  6Comments