10 ms·
Where's the "declarative" part here? It's common to do number crunching in NumPy with Python as the control layer. But the Python code is imperative.
by Animats 9y ago
Where's the "declarative" part here? It's common to do number crunching in NumPy with Python as the control layer. But the Python code is imperative.
- dfox 9y agoIt is declarative in the sense that the imperative code builds up some kind of object tree that declaratively describes the operation that is performed as late as possible. Numpy does not really work this way, but TensorFlow does and viewed from the right PoV this is also how SQLAchemy works.
- joshuamorton 9y agoNumpy is declarative in the sense that it is vectorized.
- Animats 9y ago?
- joshuamorton 9y agoInstead of explicitly writing loops, you decalre an operation like add, and it is looped over a vector for you.
- Animats 9y agoThat's just application. "Do this to all that stuff". Imperative, but possibly parallel.