Skip to content

PR: Implement support for continuous function iteration.#1088

Merged
KelSolaar merged 1 commit intodevelopfrom
feature/iterable_signal
Dec 23, 2022
Merged

PR: Implement support for continuous function iteration.#1088
KelSolaar merged 1 commit intodevelopfrom
feature/iterable_signal

Conversation

@KelSolaar
Copy link
Copy Markdown
Member

@KelSolaar KelSolaar commented Dec 22, 2022

Summary

This PR implements support for continuous signal iteration while preventing code hanging while iterating by error on a colour.SpectralDistribution or colour.MultiSpectralDistributions class instances.

import colour

sd = colour.SDS_ILLUMINANTS["A"]
for i in sd:
    print(i)
[ 300.          0.930483]
[ 305.         1.12821]
[ 310.         1.35769]
...
[ 780.     241.675]
import colour

sd = colour.MSDS_CMFS["CIE 2012 2 Degree Standard Observer"]
for i in sd:
    print(i)
[  3.90000000e+02   3.76964700e-03   4.14616100e-04   1.84726000e-02]
[  3.91000000e+02   4.53241600e-03   5.02833300e-04   2.22110100e-02]
[  3.92000000e+02   5.44655300e-03   6.08499100e-04   2.66981900e-02]
...
[  8.30000000e+02   1.76246500e-06   7.05386000e-07   0.00000000e+00]

Preflight

Code Style and Quality

  • Unit tests have been implemented and passed.
  • Pyright static checking has been run and passed.
  • Pre-commit hooks have been run and passed.
  • [N/A] New transformations have been added to the Automatic Colour Conversion Graph.
  • [N/A] New transformations have been exported to the relevant namespaces, e.g. colour, colour.models.

Documentation

  • New features are documented along with examples if relevant.
  • The documentation is Sphinx and numpydoc compliant.

@KelSolaar KelSolaar added this to the v0.4.3 milestone Dec 22, 2022
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.0e-05%) to 99.953% when pulling 974be64 on feature/iterable_signal into 9671764 on develop.

@KelSolaar KelSolaar merged commit e046a9e into develop Dec 23, 2022
@KelSolaar KelSolaar deleted the feature/iterable_signal branch December 23, 2022 02:04
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