[ 
https://issues.apache.org/jira/browse/MADLIB-1006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15322854#comment-15322854
 ] 

Frank McQuillan commented on MADLIB-1006:
-----------------------------------------

Thanks for the catch, Yui.

Yes that is a bug.  e.g., in the simple examples in
matrix_extract_row
matrix_extract_col
in
http://madlib.incubator.apache.org/docs/latest/group__grp__matrix.html
it works for 1-9 but fails for 10 with errors like

{code}
InternalError: (psycopg2.InternalError) plpy.Error: Matrix error: The index 
(10) is invalid compared to dimension size (10)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "matrix_extract_col", line 24, in <module>
    schema_madlib, matrix_in, in_args, 2, index)
  PL/Python function "matrix_extract_col", line 1039, in matrix_extract
  PL/Python function "matrix_extract_col", line 18, in _assert
PL/Python function "matrix_extract_col"
 [SQL: 'SELECT madlib.matrix_extract_col(\'"mat_A"\', \'row=row_id, 
val=row_vec\', 10);']
{code}


> invalid argument ranges in matrix_extract
> -----------------------------------------
>
>                 Key: MADLIB-1006
>                 URL: https://issues.apache.org/jira/browse/MADLIB-1006
>             Project: Apache MADlib
>          Issue Type: Bug
>          Components: Module: Linear-Algebra Functions
>            Reporter: Yui Noma
>             Fix For: v1.9.1
>
>
> To whom it may concern,
> Hello, I'm a newbie to use MADlib in PostgreSQL 9.4. When I was reading the 
> document, I may find a bug related to the functions, matrix_extract_row, and 
> matrix_extract_col. The two function extract a row/col specified by the 
> argument. But it does not work well for the last row/col. This is caused by 
> the inconsistency related to the indices because the index of a MADlib matrix 
> must start from 1 but the index of the function matrix_extract defined in 
> ports/postgres/modules/linalg/matrix_ops.py_in starts from 0.
> Sincelery,



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to