systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deron Eriksson <deroneriks...@gmail.com>
Subject print a value in a frame?
Date Wed, 29 Jun 2016 20:23:29 GMT
How do I print a value in a frame?

Suppose I have the following 2x2 csv file:
one,two
three,four

I read it in with:
M = read($Min, data_type='frame', format='csv');

(1)
If I try:
   print(M[1,1]);
I get:
   ERROR: null -- line 1, column 0 -- print statement can only print scalars

(2)
If I try:
   print(as.scalar(M[1,1]));
I get:
   ERROR: null -- line 2, column 7 -- Expecting matrix parameter for
function CAST_AS_SCALAR

(3)
If I try:
   print(as.scalar(as.matrix(M[1,1])));
I get:

 file:/.../src/test/scripts/org/apache/sysml/api/mlcontext/one-two-three-four.csv
not a SequenceFile

Thanks,
Deron

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message