Skip to content

Add common abbreviation for sympy to KB #96

Description

@pylang

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

No activity

Activity on this issue will appear here.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions