FormulaLab
1.0.0
Formulalabは開発中であり、現在は安定していません!
Formulalabは、新しいフォーミュラを数学的に導き出し、式で検索し、プロジェクトコードをフォーミュラデータベース(FD)に接続するPythonパッケージです。 FDは、フォーミュラのコレクションをすべて1か所にリスト、参照、発言、および整理するための賢く効率的な方法です。 FDは、編集と挿入がすべてのために1回だけ行われている場合、必要な数のプロジェクトに接続できます。 FDの式は、さまざまな形式で書き直す必要はなく、1つの形で十分であり、残りはFormulalabによって派生しています。たとえば、 Area = Pi * radius^2 、 radiusを要求する場合、Formulalabはあなたのためにそれを解決します - FDで繰り返しは必要ありません。
Formulalabは次のことに依存します。
Formulalabをインストールするには:
pip install FormulaLab >> > import FormulaLab as fl
>> > Physics_formulas = [ 'F = m*a' , 'v = a*t' ]
>> > phy_search = fl . FormulaSearch ( data = Physics_formulas )
>> > phy_search
ID Formula Args
0 1 f = m * a [ m , a , f ]
1 2 v = a * t [ a , v , t ]
# Now, say you want to derive F as a function of t
>> > Force = phy_search . derive ( 'F' , 't' )
>> > Force
[ m * v / t ]
# Now, you want to convert it to a python function
>> > Force_py = phy_search . function ( Force [ 0 ])
>> > Force_py ( m = 2 , v = 3 , t = 2 )
3.0
# Now, you want to find the the value of "t" in a direct search (no subtitution)
>> > phy_search . find ( 't' )
[ v / a ]
>> > phy_search . find ( 'a' )
[ F / m , v / t ]
# What if you want "a" as a function of "t" and "v", only in a direct search:
>> > phy_search . find ( 'a' , [ 't' , 'v' ])
[ v / t ]
# Now, you want to find `a` from the first equation that has ID=1
>> > phy_search . find ( 'a' , id = 1 )
[ f / m ]Formulalabにアクセスしてください
Abdulaziz Alqasem
[email protected]
Formulalabはsympyにbultです