fixes gradient stopping test
added ability to initialize array with ndarray