Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
StanczakDominik committed May 6, 2020
1 parent ba7e6fc commit 6c7b711
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
24 changes: 0 additions & 24 deletions benchmarks/benchmark_MathematicsSuite.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
"""Functions from mathematics to benchmark with aerospeed velocity """

import astropy.units as u
from plasmapy.formulary import (
plasma_dispersion_func,
plasma_dispersion_func_deriv,
Fermi_integral
)


class mathematics:
"""
Benchmark that times the performance of funcions from
mathematics/mathematics.py file
"""

def setup(self):
pass

def time_plasma_dispersion_func(self):
plasma_dispersion_func(-1.52+0.47j)

def time_plasma_dispersion_func_deriv(self):
plasma_dispersion_func_deriv(-1.52+0.47j)

def time_Fermi_integral(self):
Fermi_integral(1, 0)
31 changes: 31 additions & 0 deletions benchmarks/benchmark_PhysicsSuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@
from numpy import pi


class mathematics:
"""
Benchmark that times the performance of funcions from
mathematics/mathematics.py file
"""

def setup(self):
pass

def time_plasma_dispersion_func(self):
plasma_dispersion_func(-1.52+0.47j)

def time_plasma_dispersion_func_deriv(self):
plasma_dispersion_func_deriv(-1.52+0.47j)

def time_Fermi_integral(self):
Fermi_integral(1, 0)

try:
#For dielectric class
from plasmapy.physics import (
Expand Down Expand Up @@ -61,11 +79,24 @@
chemical_potential,
)

from plasmapy.mathematics import (
plasma_dispersion_func,
plasma_dispersion_func_deriv,
Fermi_integral
)

#For relativity class
from plasmapy.physics import Lorentz_factor
from plasmapy.physics import parameters
except ImportError:
from plasmapy.formulary import parameters

from plasmapy.formulary import (
plasma_dispersion_func,
plasma_dispersion_func_deriv,
Fermi_integral
)

#For dielectric class
from plasmapy.formulary import (
cold_plasma_permittivity_SDP,
Expand Down

0 comments on commit 6c7b711

Please sign in to comment.