Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multidimensional MfArray with different length Arrays in axis 1 #35

Closed
sthuettr opened this issue Jul 26, 2022 · 2 comments
Closed

Multidimensional MfArray with different length Arrays in axis 1 #35

sthuettr opened this issue Jul 26, 2022 · 2 comments

Comments

@sthuettr
Copy link

Hello, I need to write a lot of python (numpy) code in swift and there I found your library. It would be a great help. Is it possible to create MfArrays that have different lengths at axis=1. Here is an example of what I mean:

[
    [1, 2, 3, 4],
    [1, 2, 3],
    [1, 2, 3, 4, 5]
]

If so, how would I need to instantiate the array?

@jjjkkkjjj
Copy link
Owner

jjjkkkjjj commented Jul 28, 2022

@sthuettr
Sorry for late response.
Unfortunately Matft doesn’t support object type, so you can’t operate what you showed the unbalanced array in Matft.

How operated array do you want?
= how do you operate the below array in Matft?

[
    [1, 2, 3, 4],
    [1, 2, 3],
    [1, 2, 3, 4, 5]
]

@sthuettr
Copy link
Author

Ah ok I understand. Then I will just pad the arrays up to the same size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants