Raising a ValueError would be more explicit than an Exception. Also, having the shape of the array represented in the error message is very helpful. Something like:
<pre>
 'This function only accepts 2D arrays. An array of shape %r was passed.' % m.shape
</pre>