evalf / nutils

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

no implicit type casting #841

Closed joostvanzwieten closed 8 months ago

joostvanzwieten commented 8 months ago

Many of the evaluable array ops (the functions, not the classes) support automatic type casting. For example you can do evaluable.add(1, 1.5) without problems. However, you can also do evaluable.add(True, 1) (evaluates to 2, int), and here implicit casting makes less sense. To prevent unforeseen casts, this PR disallows all implicit casting in evaluable array ops.