Skip to content

[Enhancement] Matlab-like type system #21

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

Merged
merged 58 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ef198da
[Enhancement]: matlab-like type system (WIP)
balbasty Feb 3, 2025
90bac5b
[Doc]: Rename NumArray/CellArray/StructArray to Array/Cell/Struct in …
balbasty Feb 3, 2025
9984c10
[Fix] properly deal with _process_argout(None) and _process_argin(Mat…
balbasty Feb 4, 2025
3eda0b1
[Fix]: forgot to remove print statement
balbasty Feb 4, 2025
77e9a50
Reorganize + make Cell behave like a list (needs testing)
balbasty Feb 20, 2025
72e0713
Oops should be a relative import
balbasty Feb 20, 2025
f88159c
Fix: replace use of ndarray properties with external np functions
balbasty Feb 20, 2025
4c4afc1
Tests pass
balbasty Feb 20, 2025
87d77d0
Reorganise/rename + implement ABCs MutableSequence and MutableMapping
balbasty Feb 21, 2025
0ff3944
Couple of fixes
balbasty Feb 21, 2025
15a8ba7
Fixes
balbasty Feb 24, 2025
5a5dbaa
Fix: do not directly access data field
balbasty Feb 24, 2025
b3dcb0e
Use np.nditer instead of _iterall + SparseArray wrapper
balbasty Feb 25, 2025
191e1b8
Test + fixes for cells (wip)
balbasty Feb 25, 2025
afe0550
Fixes + test_cell
balbasty Feb 25, 2025
eaf8e16
Add MatlabFunction wrapper for function handles + Roundtrip test for …
balbasty Feb 26, 2025
dc068ac
Array tests + fixes
balbasty Feb 26, 2025
203a39f
Test batch creation + fix _as_runtime for scalar Struct
balbasty Feb 26, 2025
45c2562
Comments
balbasty Feb 26, 2025
b86015b
Call correct get/set/del in Struct
balbasty Feb 26, 2025
1733253
Fix: re-define _as_matlab_object (which is used by all class wrappers)
balbasty Feb 27, 2025
1d94c47
Enhancement: use new delayed logic that forbids non-finalized objects
balbasty Mar 2, 2025
bcaec00
Enhancement: use new delayed logic that forbids non-finalized objects
balbasty Mar 2, 2025
e3b9817
Fix: remove old imports used for debugging
balbasty Mar 2, 2025
730d49a
Remove old debug/trace
balbasty Mar 2, 2025
4ba66ac
Remove one more debugging line + avoid setting useless defaults
balbasty Mar 2, 2025
904ea1d
Fix: delayed struct/cell that are not inside another delayed array + …
balbasty Mar 2, 2025
00d6736
Fix typos + more questions
balbasty Mar 3, 2025
5517c51
Enh: handle with char arrays (convert them to cellstr)
balbasty Mar 3, 2025
ab2a12c
Doc: translation of auditory_spm12_batch.m to python
balbasty Mar 3, 2025
1d3b7cd
Doc: auditory tutorial
balbasty Mar 3, 2025
51dc39c
Fix(SparseArray) overload __init__ instead of __new__
balbasty Mar 3, 2025
44b9bd3
Example: DCM_ERP demo
balbasty Mar 3, 2025
dcb77fb
Fix: define SparseArray even is sparse not available to avoid import …
balbasty Mar 3, 2025
f51d4ad
[Enhancement] Add new tests for Runtime conversion
johmedr Mar 6, 2025
846cb38
[Enh] Add tests for struct array indexing after initialisation - failing
johmedr Mar 6, 2025
8e7cf1f
[Enh] Update tests for row and column cell arrays
johmedr Mar 6, 2025
b5966a8
[Bug fix] Use fromiter instead of array to convert empty matlab cell …
johmedr Mar 6, 2025
9367c44
Fix conversion of cells (or cells of cells) from matlab
balbasty Mar 6, 2025
5f49e41
[Enh] Check size and class on Matlab side
johmedr Mar 6, 2025
4f65d7b
[MAJ] Recompile - see commit message
johmedr Mar 6, 2025
aedfcab
[MAJ] Add new files compiled from SPM25
johmedr Mar 6, 2025
b666d3d
[Enh] Refactor Cell tests for cleaner outputs
johmedr Mar 7, 2025
8830a07
[Enh] Refactor and add some Array tests
johmedr Mar 7, 2025
af8e38b
[Enh] Add tests to Array - passing
johmedr Mar 7, 2025
827c373
[Enh] Refactor MatlabClass tests
johmedr Mar 7, 2025
a846ab1
[Enh] Refactor MatlabClass tests
johmedr Mar 7, 2025
52cdffa
[Enh] Refactor MatlabClass tests
johmedr Mar 7, 2025
727daae
[Enh] Add tests on struct
johmedr Mar 7, 2025
99e353f
[Bug fix] fix iteration on struct arrays
johmedr Mar 10, 2025
e75f000
[Enhancement] Recompile with support for sparse arrays on Matlab side
johmedr Mar 10, 2025
d519c18
[Bug fix] Fix indexing on test from Matlab struct array.
johmedr Mar 10, 2025
486a051
Fixes made in parallel to Johan's and that might need to be reverted
balbasty Mar 11, 2025
c923d08
[Fix] conversion of cell of arrays + implicit resizing of scalar stru…
balbasty Mar 11, 2025
5b5223f
[Fix] use 2d empty arrays instead of 1d empty arrays as defaults
balbasty Mar 12, 2025
45eff9e
[Fix]: use new ind/val serialization for SparseArray
balbasty Mar 12, 2025
b5498b9
[Fix] Use CRC layout instead of COO
balbasty Mar 12, 2025
6e5ff8b
[Enhancement] squeeze first axis of row arrays/structs
balbasty Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions spm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .__wrapper__ import Struct, Cell, StructArray, Runtime
from .__wrapper__ import Struct, Cell, Array, Runtime
from .file_array import file_array
from .gifti import gifti
from .meeg import meeg
Expand Down Expand Up @@ -825,4 +825,3 @@
from .spm_zeros import spm_zeros
from .__tests import *
from .__toolbox import *

Loading
Loading