Now uses assert() for bad use of function in array API. Removed associated unit tests.

Also added a -DNDEBUG flags when compiling in release mode.