Fixing issue #685
Addressing comments about asarray and cases when the rows have negative values
Addressing map comments
Merge pull request #692 from antgonza/fix_issue_685

Fixing issue #685