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

FDataIrregular personal proposed reviews #593

Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0f90db2
use ary.ndim instead of len(ary.shape)
eliegoudout Nov 14, 2023
26b5f0c
points_split and values_split as properties
eliegoudout Nov 14, 2023
fb69594
FDataIrregular.cleaned restrict method
eliegoudout Nov 14, 2023
ad71339
cleaner concatenate
eliegoudout Nov 15, 2023
f6a87ad
FDataIrregular.__init__: validate start_indices
eliegoudout Nov 23, 2023
eee51ad
FDataIrregular.round clean (why start_indices special treatment?)
eliegoudout Nov 23, 2023
3bd25fa
minor clean
eliegoudout Nov 23, 2023
ea7e6dd
FDataIrregular._to_data_matrix clean remove loops
eliegoudout Nov 23, 2023
6e32109
revert: remove *_split properties
eliegoudout Nov 23, 2023
5b0ba71
restrict keep empty samples
eliegoudout Nov 23, 2023
b107525
_reduceat v0
eliegoudout Nov 24, 2023
0e9949f
_get_sample_range_from_data update
eliegoudout Nov 24, 2023
6a8a90d
Two-modes _reduceat for later decision
eliegoudout Nov 29, 2023
22aa8c7
handle nan for domain range compute + enforce float type + allow len(…
eliegoudout Nov 29, 2023
11508c1
clean _sort_by_arguments
eliegoudout Nov 29, 2023
5a841ed
_reduceat wrapper + minor mods
eliegoudout Feb 2, 2024
1a1835e
removed useless op (???)
eliegoudout Feb 14, 2024
f0fe0d7
cleaner _sort_by_arguments from vnmabus
eliegoudout Feb 14, 2024
4a2fc88
resolve reviews
eliegoudout Feb 14, 2024
01fe0ba
better lexsort comment
eliegoudout Feb 15, 2024
3856e10
Merge branch 'develop' into pr-593
vnmabus Feb 19, 2024
d06e843
Merge branch 'feature/irregular_operations' into feature/irregular_op…
vnmabus Feb 24, 2024
ee89c2c
fixed typo domain_range max
eliegoudout Feb 26, 2024
6bf925c
fixed restrict + allow domain_range broadcast
eliegoudout Feb 26, 2024
16c8109
Merge branch 'feature/irregular_operations' of https://github.com/eli…
eliegoudout Feb 26, 2024
777bd5d
Merge branch 'feature/irregular_operations' into feature/irregular_op…
vnmabus Mar 7, 2024
fb6502f
Fix doctests.
vnmabus Mar 7, 2024
cd7e73e
Fix typo.
vnmabus Mar 11, 2024
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
2 changes: 1 addition & 1 deletion skfda/misc/covariances.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _transform_to_2d(t: ArrayLike) -> NDArrayFloat:
"""Transform 1d arrays in column vectors."""
t = np.asfarray(t)

dim = len(t.shape)
dim = t.ndim
assert dim <= 2

if dim < 2:
Expand Down
2 changes: 1 addition & 1 deletion skfda/ml/regression/_linear_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ def _check_and_convert(
np.ndarray: numpy 2D array.
"""
new_X = np.asarray(X)
if len(new_X.shape) == 1:
if new_X.ndim == 1:
new_X = new_X[:, np.newaxis]
return new_X

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
def _transform_to_2d(t: ArrayLike) -> NDArrayFloat:
t = np.asfarray(t)

dim = len(t.shape)
dim = t.ndim
assert dim <= 2

if dim < 2:
Expand Down
4 changes: 2 additions & 2 deletions skfda/representation/basis/_fdatabasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,8 @@ def _array_to_R( # noqa: N802
coefficients: NDArrayFloat,
transpose: bool = False,
) -> str:
if len(coefficients.shape) == 1:
coefficients = coefficients.reshape((1, coefficients.shape[0]))
if coefficients.ndim == 1:
coefficients = coefficients[None]

if transpose is True:
coefficients = np.transpose(coefficients)
Expand Down
Loading
Loading