kstaats / karoo_gp

A Genetic Programming platform for Python with TensorFlow for wicked-fast CPU and GPU support.
Other
159 stars 61 forks source link

Sympy & Numpy Issue #94

Open asksak opened 2 years ago

asksak commented 2 years ago

Hello,

After doing some testing, I am nearly certain that Sympy & Numpy don't play well together, especially when tree depth and min nodes are higher than 5.

There are many references on stack overflow regarding this issue.

asksak commented 2 years ago

Numpy arrays don't play well with sympy objects (they're best if you use built-in numerical types with numpy). You should try sympy arrays instead, which will support something like . subs . Look at recent sympy posts that also use lambdify

asksak commented 2 years ago

y*(2+i)(5+j)

Vs

y*((2+i)(5+j))

Consider the result after mutation in each case.

granawkins commented 2 years ago

Which interaction with Numpy do you mean?