evalf / nutils

The nutils project
http://www.nutils.org/
MIT License
88 stars 48 forks source link

replace const Arrays with Constants in optimize #854

Closed joostvanzwieten closed 6 months ago

joostvanzwieten commented 6 months ago

To speed-up repeated evaluation of the same Evaluable, this PR introduces Evaluable._deep_flatten_constants, which replaces constant Arrays with Constants, excluding the no-op arrays Transpose and InsertAxis, and includes this in optimized_for_numpy.