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

Feature/irregular_structure_and_operations #536

Merged
merged 158 commits into from
Mar 11, 2024

Conversation

opintosant
Copy link
Contributor

Full functionality of FDataIrregular structure and operations. Includes:

  • Base structure. Create FDataIrregular. Load from FDataGrid or pandas.DataFrame.
  • Representation: Plot and Scatter.
  • Dataset 'bone_density_ext' added to _real_datasets.
  • Arithmetic and numerical operations with scalars, vectors, and other FDataIrregular objects.
  • Conversion from FDataIrregular to FDataGrid and FDataBasis.

…ading from dataframe can now be done as a class method
… Function plot_and_scatter removed as it can be replicated by using the marker argument
…gularCoordinateIterator for the FDataIrregular class

import itertools
import numbers
from typing import (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
F401 'typing.Callable' imported but unused

GridPointsLike,
LabelTupleLike,
)
from ..typing._numpy import (

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
F401 '..typing._numpy.DTypeLike' imported but unused

dtype=None,
out=None,
*,
value_empty

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
C816 missing trailing comma in Python 3.6+

*,
value_empty
):
"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
D401 First line should be in imperative mood

good_idx = tuple(good_idx)

reduceat_out = ufunc.reduceat(
array, indices[good_axis_idx], axis=axis, dtype=dtype

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
C812 missing trailing comma


sample_idx = (
np.searchsorted(
self.start_indices, np.arange(len(self.points)), "right"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
C812 missing trailing comma


if domain_range is None:
sample_range = _get_sample_range_from_data(
self.start_indices, self.points

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
C812 missing trailing comma

try:
from numpy.typing import ArrayLike as ArrayLike # noqa: WPS113
try: # noqa: WPS113
from numpy.typing import ArrayLike as ArrayLike, DTypeLike as DTypeLike

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS113 Found same alias import: ArrayLike

try:
from numpy.typing import ArrayLike as ArrayLike # noqa: WPS113
try: # noqa: WPS113
from numpy.typing import ArrayLike as ArrayLike, DTypeLike as DTypeLike

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS113 Found same alias import: DTypeLike

except ImportError:
ArrayLike = np.ndarray # type:ignore[misc] # noqa: WPS440
DTypeLike = np.dtype # type:ignore[misc]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pep8] reported by reviewdog 🐶
WPS440 Found block variables overlap: DTypeLike

Copy link
Member

@vnmabus vnmabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the recent changes from PR #593, this is now ready to go,

@vnmabus vnmabus merged commit 6b11674 into develop Mar 11, 2024
16 of 17 checks passed
@vnmabus vnmabus deleted the feature/irregular_operations branch March 11, 2024 11:44
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.

None yet

4 participants