mirror of
https://github.com/vale981/SecondaryValue
synced 2025-03-04 16:41:38 -05:00
get symbols recursively
This commit is contained in:
parent
f56f054153
commit
2dbfcf1645
2 changed files with 7 additions and 5 deletions
|
@ -147,7 +147,7 @@ class SecondaryValue:
|
|||
|
||||
for var in args:
|
||||
if var not in self._derivatives:
|
||||
self._derivatives[var] = sympy.diff(self._parsed, var)
|
||||
self._derivatives[var] = diff(self._parsed, var)
|
||||
|
||||
return {var: self._derivatives[var] for var in args}
|
||||
|
||||
|
@ -167,8 +167,10 @@ class SecondaryValue:
|
|||
|
||||
def get_symbols(self):
|
||||
"""
|
||||
:returns: The symbols that can be substituted.
|
||||
:rtype: set
|
||||
:returns: The symbols that can be substituted (recursively).
|
||||
:rtype: dict
|
||||
"""
|
||||
|
||||
return self._symbols
|
||||
return {symbol: self._deps[symbol].get_symbols() \
|
||||
if symbol in self._deps else {} \
|
||||
for symbol in self._symbols}
|
||||
|
|
2
setup.py
2
setup.py
|
@ -6,7 +6,7 @@ def readme():
|
|||
return f.read()
|
||||
|
||||
setup(name='SecondaryValue',
|
||||
version='0.0.9',
|
||||
version='0.1.0',
|
||||
description='A helper to calculate the gaussian error propagation.',
|
||||
long_description=readme(),
|
||||
long_description_content_type='text/markdown',
|
||||
|
|
Loading…
Add table
Reference in a new issue