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

Improve handling of complex arrays #50

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Improve handling of complex arrays #50

merged 1 commit into from
Jan 31, 2025

Conversation

mchitre
Copy link
Member

@mchitre mchitre commented Jan 30, 2025

Improves complex and multidimensional array handling. When an array is complex, the equivalent __isComplex field defined in the fjåge gateway specification is automatically added and set to true.

If the array is multidimensional, it is serialized in Fortran order (in line with Python gateway implementation). There is no official recommendation from fjåge for multidimensional arrays at this time, but having consistency across implementations is desirable.

@ettersi
Copy link
Collaborator

ettersi commented Jan 31, 2025

If the array is multidimensional, it is serialized in Fortran order (in line with Python gateway implementation). There is no official recommendation from fjåge for multidimensional arrays at this time, but having consistency across implementations is desirable.

So what's the current specification? That sending multidimensional arrays is unsupported in general but for signals we adopt row-major ordering?

@mchitre
Copy link
Member Author

mchitre commented Jan 31, 2025

So what's the current specification? That sending multidimensional arrays is unsupported in general but for signals we adopt row-major ordering?

Yes.

We haven't written anything in the general fjåge spec. In many uses (e.g. UnetStack), we use interleaved multichannel signals, which amounts to FORTRAN ordering. That is why unetpy and UnetSockets.jl need FORTRAN ordering -- and it has become a de facto default. We should formalize it at some point.

@mchitre mchitre merged commit 14888cb into master Jan 31, 2025
2 checks passed
@mchitre mchitre deleted the fix-complex branch January 31, 2025 02:35
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

Successfully merging this pull request may close these issues.

2 participants