Package: numpsy
NumpSyStraight up mix between NumPy, SymPy and Pandas into a value single-declaration extendable framework to simulatenously perform symbolic and numerical operations.Objectives:Ever think you wanted to simultaneously perform numerical and symbolic mathematics for an engineering or optimization derivation? Now you can pretty much intuitively derivate simultaneously whilst performing unit management automatically.Integrate mathematical analytical derivation Python toolchains into a single handy one that retains and expands each of the constituent packages methods. Retain intuitive compatibility.Have fun!Is it any good?I think it's an elegant mathematical representation to simultanously perform symbolic, numerical, and data science operations into a single system. It targets a minimal overhead to raw numpy, sympy or scipy operations.Quick StartDownload theAnaconda distribution first.Pip install:$pipinstallnumpsyLocal install for most recent version:$gitclonehttps://github.com/daquintero/numpsy.git
$cdnumpsy
$python3setup.pyinstallQuick ExampleSee the10 minutes to NumpSy jupyter notebookfor much more.InstallationImport NumpSyimportnumpsyasnsyUnitsDeclare a Unitmeter=nsy.Unit(name="meter",symbol="m")meterUnitnamemetersymbol\begin{equation}m\end{equation}symbolic_expression\begin{equation}Ø\end{equation}Retrieve attributes from this Unitmeter.s$\displaystyle m$meter.symbol$\displaystyle m$meter.name'meter'Operate with this unitfarad_per_meter=nsy.Unit(name="Farad",symbol="F")/meterfarad_per_meterUnitname(Farad)per(meter)symbol\begin{equation}Ø\end{equation}symbolic_expression\begin{equation}\frac{F}{m}\end{equation}Append to Unit Librarynsy.Units().dataHertz     Unit       name name_expression               ...
Farad     Unit       name name_expression               ...
meter     Unit       name name_expression               ...
ohm       Unit     name name_expression                 ...
ratio     Unit       name name_expression               ...
second    Unit        name name_expression              ...
Name: 0, dtype: objectnsy.uHertz     Unit       name name_expression               ...
Farad     Unit       name name_expression               ...
meter     Unit       name name_expression               ...
ohm       Unit     name name_expression                 ...
ratio     Unit       name name_expression               ...
second    Unit        name name_expression              ...
Name: 0, dtype: objectConstante_0=nsy.Constant(name="permittivity_vaccum",symbol="\epsilon_0",numerical=8.8541878128e-12,unit=farad_per_meter)e_0Constantnamepermittivity_vaccumsymbol\begin{equation}\epsilon_0\end{equation}symbolic_expression\begin{equation}Ø\end{equation}numerical8.8541878128e-12unitSymbol: \begin{equation}Ø\end{equation}Symbolic Expression: \begin{equation}\frac{F}{m}\end{equation}e_0.s$\displaystyle \epsilon_0$e_0.n8.8541878128e-12e_d=nsy.Constant(name="dielectric_permittivity",symbol="\epsilon_d",numerical=5,unit=nsy.u.ratio)e_dConstantnamedielectric_permittivitysymbol\begin{equation}\epsilon_d\end{equation}symbolic_expression\begin{equation}Ø\end{equation}numerical5unitSymbol: \begin{equation}\end{equation}Symbolic Expression: \begin{equation}Ø\end{equation}Constants cannot be mutatede_d.n=10Constant cannot be mutated. You cannot set any attribute value. Instantiate a new variable.Variablecapacitor_plate_separation=nsy.Variable(name="capacitor_plate_separation",symbol="d",numerical=None,unit=nsy.u.meter)capacitor_plate_separationVariablenamecapacitor_plate_separationsymbol\begin{equation}d\end{equation}symbolic_expression\begin{equation}Ø\end{equation}numericalunitSymbol: \begin{equation}m\end{equation}Symbolic Expression: \begin{equation}Ø\end{equation}capacitor_plate_separation.s$\displaystyle d$capacitor_plate_separation.uUnitnamemetersymbol\begin{equation}m\end{equation}symbolic_expression\begin{equation}Ø\end{equation}Variables can be mutatedcapacitor_plate_separation.n=1e-6capacitor_plate_separation.n1e-06capacitor_plate_separation.numerical=3e-5capacitor_plate_separation.numerical3e-05Operate between Value objectsConstants and Variables are value objects.capacitance_per_plate_cross_sectional_area=e_d/(e_0*capacitor_plate_separation)capacitance_per_plate_cross_sectional_areaValuenamesymbol\begin{equation}Ø\end{equation}symbolic_expression\begin{equation}\frac{\epsilon_d}{\epsilon_0 d}\end{equation}numerical1.8823484456216984e+16unitSymbol: \begin{equation}Ø\end{equation}Symbolic Expression: \begin{equation}\frac{}{F}\end{equation}capacitance_per_plate_cross_sectional_area.se$\displaystyle \frac{\epsilon_d}{\epsilon_0 d}$capacitance_per_plate_cross_sectional_area.n1.8823484456216984e+16Perform Flexible Class Operationsraw_capacitor_cross_sectional_area=(1e-6)**2raw_capacitor_cross_sectional_area1e-12device_capacitance=capacitance_per_plate_cross_sectional_area*raw_capacitor_cross_sectional_areadevice_capacitanceValuenamesymbol\begin{equation}Ø\end{equation}symbolic_expression\begin{equation}\frac{\epsilon_d Ø}{\epsilon_0 d}\end{equation}numerical18823.484456216982unitSymbol: \begin{equation}Ø\end{equation}Symbolic Expression: \begin{equation}\frac{Ø}{F}\end{equation}device_capacitance.name''device_capacitance.se$\displaystyle \frac{\epsilon_d Ø}{\epsilon_0 d}$device_capacitance.symbol="F"device_capacitance.symbol$\displaystyle F$raw_capacitor_cross_sectional_area1e-12Example Functionsnsy.sqrt(device_capacitance)Valuenamesymbol\begin{equation}Ø\end{equation}symbolic_expression\begin{equation}\sqrt{F}\end{equation}numerical137.19870428038664unitSymbol: \begin{equation}Ø\end{equation}Symbolic Expression: \begin{equation}\sqrt{\frac{Ø}{F}}\end{equation}nsy.sinh(device_capacitance)Valuenamesymbol\begin{equation}Ø\end{equation}symbolic_expression\begin{equation}\sinh{\left(F \right)}\end{equation}numericalinfunitSymbol: \begin{equation}Ø\end{equation}Symbolic Expression: \begin{equation}\sqrt{\frac{Ø}{F}}\end{equation}Future plansExtend unit management and verification.Create a full constants list, probably even in Excel or as an importable CSV file into Pandas.Open to contributions.