Skip to content

TypeError: 'numpy.ndarray' object is not callable matlab2python #4

Description

@SDIdo

Dear ebranlard,
Thank you for making this amazing tool.
We have almost everything converted out-of-the-box with minor bearable changes.

Issue:
The recognizing of a matlab array or matrix is needed many times.
Matlab2Python, currently, doesn't recognize and thus takes slicing as a function call.
This probably makes it not recognize the index change that is needed as well.

Recreation:

test.m

x = [1:4,11:14];
y = x(1,1);
disp(y);

test.py

import numpy as np
x = np.array([np.arange(1,4+1),np.arange(11,14+1)])
y = x(1,1)
print(y)

y = x(1,1), at run, will cause the following error
TypeError: 'numpy.ndarray' object is not callable

Will be glad for a fix or a direction towards what to change in the code.

Best Regards,
SDido

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions