Skip to content

Conversation

tjdcs
Copy link
Contributor

@tjdcs tjdcs commented Jan 6, 2025

This adds a utility constructor for constructing a SpectralShape directly from a list of values.

Not sure if this is already available elsewhere, but if it is then perhaps this organization (placing the method inside the definition of SpectralShape) is better?

‼️Ahead of #1321

@tjdcs tjdcs requested a review from KelSolaar January 6, 2025 00:31
@tjdcs tjdcs force-pushed the feature/shape_from_array branch from ce0caf1 to 715d256 Compare January 6, 2025 00:35
@coveralls
Copy link

Coverage Status

coverage: 97.472% (+0.001%) from 97.471%
when pulling 715d256 on feature/shape_from_array
into 87ea299 on develop.

Copy link
Member

@KelSolaar KelSolaar left a comment

Choose a reason for hiding this comment

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

Thanks, great idea!

I left a few minor comments that would be good to address.

np.arange(0, 10 + 0.1, 0.1),
)

def test_from_data(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Major

test_from_data --> test_from_array/test_from_wavelengths

@KelSolaar KelSolaar changed the title Add from_array class method (constructor) to SpectralShape PR: Add colour.SpectralShape.from_array class method (constructor). Jan 7, 2025
@KelSolaar KelSolaar added this to the v0.4.7 milestone Jan 7, 2025
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.

3 participants