<p>First of all, there are very fundamental differences between libraries like TensorFlow and NumPy. In TensorFlow you basically define a computation graph in a symbolic manner and nothing is computed unless you call the function <code>run</code> from class <code>Session</code>. It is very important to be careful about calling the <code>run</code> function only once (or only if required) so that you avoid redundant computation.</p>

<p>Speaking of performance, libraries like TensorFlow and Theano are good at pruning and optimizing the whole computation graph (before running) and using very optimized kernels to run the operations in the graph on available devices, including GPU. GPU is very fast and useful in doing matrix operations, but NumPy can not take advantage of it. NumPy runs the computation mostly using C++ based code, but unlike TensorFlow it does not apply a graph optimization to the whole computation graph. In fact, there is no such a thing as graph in NumPy. TensorFlow takes the whole computation to a different runtime space and then returns the concrete results after actual execution.</p>

<p>In case you are curious about what exactly is a kernel, <a href="https://arxiv.org/pdf/1603.04467.pdf" rel="nofollow noreferrer">the original TensorFlow paper</a> defines it as: "A kernel is a particular implementation of an operation that can be run on a particular type of device (e.g., CPU or GPU)."</p>

<p>There are fairly simple, but good benchmarks <a href="https://simplyml.com/linear-algebra-shootout-numpy-vs-theano-vs-tensorflow-2/" rel="nofollow noreferrer">at this blog post</a> which show by numbers how much and when TensorFlow is better than NumPy.</p>

<p>To understand how actually TensorFlow works, <a href="https://stackoverflow.com/questions/34401714/is-tensorflow-lazy">This post</a> may be useful too.</p>

<p>If your problem is not a big one which needs to deal with large scale matrices and lots of matrix operations, then I would say NumPy is easier to use and you don't need to be worried about performance. </p>
advantages of tensorflow over numpy for general computation
<p>I was reading over <a href="https://www.tensorflow.org/tutorials/pdes" rel="nofollow noreferrer">this tensorflow tutorial</a> which specifies how to run a simulation of water ripples using tensorflow. My understanding is that tensorflow variables and placeholders are used in place of generic python variables, but is there any specific (i.e. performance) advantage to using tensorflow over just numpy? </p>