Commit 589dcfcc by Adam Palay

change calcfunctions -> functions

parent 2284f56e
"""
Ideally, we wouldn't need to pull in all the calc symbols here,
but courses were using 'import calc', so we need this for
backwards compatibility
"""
from calc import * from calc import *
...@@ -9,7 +9,7 @@ import operator ...@@ -9,7 +9,7 @@ import operator
import numbers import numbers
import numpy import numpy
import scipy.constants import scipy.constants
import calcfunctions import functions
from pyparsing import ( from pyparsing import (
Word, Literal, CaselessLiteral, ZeroOrMore, MatchFirst, Optional, Forward, Word, Literal, CaselessLiteral, ZeroOrMore, MatchFirst, Optional, Forward,
...@@ -20,9 +20,9 @@ DEFAULT_FUNCTIONS = { ...@@ -20,9 +20,9 @@ DEFAULT_FUNCTIONS = {
'sin': numpy.sin, 'sin': numpy.sin,
'cos': numpy.cos, 'cos': numpy.cos,
'tan': numpy.tan, 'tan': numpy.tan,
'sec': calcfunctions.sec, 'sec': functions.sec,
'csc': calcfunctions.csc, 'csc': functions.csc,
'cot': calcfunctions.cot, 'cot': functions.cot,
'sqrt': numpy.sqrt, 'sqrt': numpy.sqrt,
'log10': numpy.log10, 'log10': numpy.log10,
'log2': numpy.log2, 'log2': numpy.log2,
...@@ -31,24 +31,24 @@ DEFAULT_FUNCTIONS = { ...@@ -31,24 +31,24 @@ DEFAULT_FUNCTIONS = {
'arccos': numpy.arccos, 'arccos': numpy.arccos,
'arcsin': numpy.arcsin, 'arcsin': numpy.arcsin,
'arctan': numpy.arctan, 'arctan': numpy.arctan,
'arcsec': calcfunctions.arcsec, 'arcsec': functions.arcsec,
'arccsc': calcfunctions.arccsc, 'arccsc': functions.arccsc,
'arccot': calcfunctions.arccot, 'arccot': functions.arccot,
'abs': numpy.abs, 'abs': numpy.abs,
'fact': math.factorial, 'fact': math.factorial,
'factorial': math.factorial, 'factorial': math.factorial,
'sinh': numpy.sinh, 'sinh': numpy.sinh,
'cosh': numpy.cosh, 'cosh': numpy.cosh,
'tanh': numpy.tanh, 'tanh': numpy.tanh,
'sech': calcfunctions.sech, 'sech': functions.sech,
'csch': calcfunctions.csch, 'csch': functions.csch,
'coth': calcfunctions.coth, 'coth': functions.coth,
'arcsinh': numpy.arcsinh, 'arcsinh': numpy.arcsinh,
'arccosh': numpy.arccosh, 'arccosh': numpy.arccosh,
'arctanh': numpy.arctanh, 'arctanh': numpy.arctanh,
'arcsech': calcfunctions.arcsech, 'arcsech': functions.arcsech,
'arccsch': calcfunctions.arccsch, 'arccsch': functions.arccsch,
'arccoth': calcfunctions.arccoth 'arccoth': functions.arccoth
} }
DEFAULT_VARIABLES = { DEFAULT_VARIABLES = {
'i': numpy.complex(0, 1), 'i': numpy.complex(0, 1),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment