mathai 0.6.9__tar.gz → 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {mathai-0.6.9 → mathai-0.7.0}/PKG-INFO +1 -1
  2. {mathai-0.6.9 → mathai-0.7.0}/mathai/base.py +5 -3
  3. {mathai-0.6.9 → mathai-0.7.0}/mathai/matrix.py +1 -1
  4. {mathai-0.6.9 → mathai-0.7.0}/mathai/parser.py +1 -1
  5. {mathai-0.6.9 → mathai-0.7.0}/mathai.egg-info/PKG-INFO +1 -1
  6. {mathai-0.6.9 → mathai-0.7.0}/setup.py +1 -1
  7. {mathai-0.6.9 → mathai-0.7.0}/README.md +0 -0
  8. {mathai-0.6.9 → mathai-0.7.0}/mathai/__init__.py +0 -0
  9. {mathai-0.6.9 → mathai-0.7.0}/mathai/apart.py +0 -0
  10. {mathai-0.6.9 → mathai-0.7.0}/mathai/bivariate_inequality.py +0 -0
  11. {mathai-0.6.9 → mathai-0.7.0}/mathai/console.py +0 -0
  12. {mathai-0.6.9 → mathai-0.7.0}/mathai/diff.py +0 -0
  13. {mathai-0.6.9 → mathai-0.7.0}/mathai/expand.py +0 -0
  14. {mathai-0.6.9 → mathai-0.7.0}/mathai/factor.py +0 -0
  15. {mathai-0.6.9 → mathai-0.7.0}/mathai/fraction.py +0 -0
  16. {mathai-0.6.9 → mathai-0.7.0}/mathai/integrate.py +0 -0
  17. {mathai-0.6.9 → mathai-0.7.0}/mathai/inverse.py +0 -0
  18. {mathai-0.6.9 → mathai-0.7.0}/mathai/limit.py +0 -0
  19. {mathai-0.6.9 → mathai-0.7.0}/mathai/linear.py +0 -0
  20. {mathai-0.6.9 → mathai-0.7.0}/mathai/logic.py +0 -0
  21. {mathai-0.6.9 → mathai-0.7.0}/mathai/ode.py +0 -0
  22. {mathai-0.6.9 → mathai-0.7.0}/mathai/parsetab.py +0 -0
  23. {mathai-0.6.9 → mathai-0.7.0}/mathai/printeq.py +0 -0
  24. {mathai-0.6.9 → mathai-0.7.0}/mathai/simplify.py +0 -0
  25. {mathai-0.6.9 → mathai-0.7.0}/mathai/structure.py +0 -0
  26. {mathai-0.6.9 → mathai-0.7.0}/mathai/tool.py +0 -0
  27. {mathai-0.6.9 → mathai-0.7.0}/mathai/trig.py +0 -0
  28. {mathai-0.6.9 → mathai-0.7.0}/mathai/univariate_inequality.py +0 -0
  29. {mathai-0.6.9 → mathai-0.7.0}/mathai.egg-info/SOURCES.txt +0 -0
  30. {mathai-0.6.9 → mathai-0.7.0}/mathai.egg-info/dependency_links.txt +0 -0
  31. {mathai-0.6.9 → mathai-0.7.0}/mathai.egg-info/requires.txt +0 -0
  32. {mathai-0.6.9 → mathai-0.7.0}/mathai.egg-info/top_level.txt +0 -0
  33. {mathai-0.6.9 → mathai-0.7.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.6.9
3
+ Version: 0.7.0
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Author: educated indians are having a low iq and are good for nothing
@@ -370,21 +370,23 @@ def product(lst):
370
370
  for item in lst[1:]:
371
371
  s *= item
372
372
  return s
373
- def flatten_tree(node, add=[]):
373
+ def flatten_tree(node):
374
+ if node is None:
375
+ return None
374
376
  if not node.children:
375
377
  return node
376
378
  ad = []
377
379
  if node.name in ["f_add", "f_mul", "f_and", "f_or", "f_wmul"]:
378
380
  merged_children = []
379
381
  for child in node.children:
380
- flattened_child = flatten_tree(child, add)
382
+ flattened_child = flatten_tree(child)
381
383
  if flattened_child.name == node.name:
382
384
  merged_children.extend(flattened_child.children)
383
385
  else:
384
386
  merged_children.append(flattened_child)
385
387
  return TreeNode(node.name, merged_children)
386
388
  else:
387
- node.children = [flatten_tree(child, add) for child in node.children]
389
+ node.children = [flatten_tree(child) for child in node.children]
388
390
  return node
389
391
  def dowhile(eq, fx):
390
392
  if eq is None:
@@ -215,7 +215,7 @@ def fold_wmul(root):
215
215
  return newnode[root]
216
216
 
217
217
  def flat(eq):
218
- return flatten_tree(eq, ["f_wmul"])
218
+ return flatten_tree(eq)
219
219
  def use(eq):
220
220
  return TreeNode(eq.name, [use(child) for child in eq.children])
221
221
  def _matrix_solve(eq):
@@ -154,7 +154,7 @@ def parse(equation, funclist=None):
154
154
  return tree_node
155
155
 
156
156
  tree_node = rfx(tree_node)
157
- tree_node = flatten_tree(tree_node, ["f_wmul"])
157
+ tree_node = flatten_tree(tree_node)
158
158
  if TreeNode.matmul == True:
159
159
  TreeNode.matmul = False
160
160
  tree_node = use(tree_form(str_form(tree_node).replace("f_w","f_")))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.6.9
3
+ Version: 0.7.0
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Author: educated indians are having a low iq and are good for nothing
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mathai",
5
- version="0.6.9",
5
+ version="0.7.0",
6
6
  description="Mathematics solving Ai tailored to NCERT",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes