systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dusenberr...@gmail.com
Subject Matrix non-range indexing should return a scalar
Date Fri, 28 Jul 2017 22:41:21 GMT
Currently, non-range matrix indexing, such as `X[1,2]`, returns a 1x1 matrix in SystemML rather
than a single scalar value.  This is inconsistent with mathematical semantics, and with array
indexing semantics of any major language, thus leading to confusion for users.

I would like to propose that non-range indexing at the language level, such as `X[1,2]`, should
return a single scalar value, and range indexing of any kind at the language level, including
the trivial example `X[1:1,2:2]`, should return a matrix.  This would lead to clear semantics
that are consistent with mathematics and language array indexing, thus preventing user confusion.
 Additionally, these are the semantics that the NumPy project uses.

Interested to hear thoughts from the rest of the community!

-Mike

--

Mike Dusenberry
GitHub: github.com/dusenberrymw
LinkedIn: linkedin.com/in/mikedusenberry

Sent from my iPhone.


Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message