Skip to content

How to multiply a set of spectrums with a vector? #1078

Answered by KelSolaar
frankkjensen asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

For the first case, the operands are broadcasted, so you should be able to do that:

>>> colour.msds_ones(labels=[1, 2, 3]) * [[1, 2, 3]]
MultiSpectralDistributions([[ 360.,    1.,    2.,    3.],
                            [ 361.,    1.,    2.,    3.],
                            [ 362.,    1.,    2.,    3.],
                            ..., 
                            [ 778.,    1.,    2.,    3.],
                            [ 779.,    1.,    2.,    3.],
                            [ 780.,    1.,    2.,    3.]],
                           ['1', '2', '3'],
                           SpragueInterpolator,
                           {},
                           Extrapolator,
      …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@frankkjensen
Comment options

@KelSolaar
Comment options

@frankkjensen
Comment options

@tjdcs
Comment options

tjdcs Dec 7, 2022
Collaborator

Answer selected by frankkjensen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants