* Fix for embedding gradient calculation
- Passes vectors instead of scalars to slice
- converts the numRows to a scalar
- add `toScalar` utility function
- minor change to test case so that it actually works
* added lib for testing helper functions
* add flatSlice function