Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
adding sympy to meta.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlewissf committed Aug 8, 2016
1 parent 971d0a3 commit 488c95e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
9 changes: 6 additions & 3 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,25 @@ requirements:
- numpy
- scikit-learn
- nose
- six
- six
- sympy
run:
- python
- numpy
- scipy
- scikit-learn
- six
- six
- sympy

test:
requires:
- numpy
- scipy
- scikit-learn
- nose
- sympy
imports:
- pyearth
- pyearth

about:
home: https://github.com/scikit-learn-contrib/py-earth
Expand Down
5 changes: 3 additions & 2 deletions pyearth/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def export_python_string(earth_model, function_name="model"):
""".format(function_name, ",\n\t\t".join(accessors))

def export_sympy(earth_model):

from sympy import Symbol, Add, Mul, Max, RealNumber, Piecewise, Pow, And
"""
Exports model in Sympy specific syntax for use with Sympy (and conversion with Sympy Codegen)
Expand Down Expand Up @@ -115,10 +116,10 @@ def termify(bf, i):
terms.append(term)

elif 'MissingnessBasisFunction' in bf_class:
print bf_var
print(bf_var)

else:
print bf_var
print(bf_var)

parent = parent.get_parent()
term_list.append(terms)
Expand Down
2 changes: 0 additions & 2 deletions pyearth/test/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,3 @@ def test_export_sympy():

y_pred = model.predict(X_df)
assert_list_almost_equal(y_pred, y_pred_sympy)


0 comments on commit 488c95e

Please sign in to comment.