-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem Description
Importing modules from SymPDE is slow and should be speeded up.
One of the reasons is that some of our modules import lots of code from third-party libraries, which is not needed in most cases. For example, file sympde/utilities/utils.py starts with
import numpy as np
import itertools as it
from sympy import lambdify
from mpl_toolkits.mplot3d import *
import matplotlib.pyplot as pltwhere the 3D matplotlib imports are only needed by the plot function plot_3d in the module, and not by lambdify_sympde. Moreover, there is no need to import everything with import *.
Suggested Solution
- Do not use:
from ... import * - Move slow imports into function definition
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request