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 common abbreviation for sympy to KB #96

Open
pylang opened this issue Sep 23, 2016 · 0 comments
Open

Add common abbreviation for sympy to KB #96

pylang opened this issue Sep 23, 2016 · 0 comments

Comments

@pylang
Copy link

pylang commented Sep 23, 2016

This issues refers to Use common abbreviations for libraries in the Python Knowledge Base.

Issue

The common abbreviation listed in the knowledge base for Scipy is import scipy as sp.

Although unmentioned, this alias conflicts with the common convention for Sympy: import sympy as sp .

Observations

I have seen statements import scipy as sc in the past. However, I find it is more common to import a submodule from Scipy, which cannot be accessed through aliases in this manner.

In general, it is recommended to import functions from submodule namespaces.

As suggested in the documentation, recommended formats include:

  1. from scipy import integrate
  2. import scipy.io as spio
  3. from scipy.stats import distributions

I don't particularly like these suggestions, but I believe they more accurately reflect common practices than what is currently stated in the knowledge base.

Requests

  1. Can the abbreviation for Sympy be added to the knowledge base?
  2. Can we use an official, recommended convention for Scipy's alias?

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant