trans_dot#

pybrops.breed.prot.sel.transfn.trans_dot(mat, wt, **kwargs)[source]#

Transform a numpy.ndarray by taking the dot product with a vector of weights

Useful for the weight sum method:

mat.shape == (npt,nobj)
wt.shape == (nobj,)
mat.dot(wt).shape == (npt,)
Parameters:
  • mat (numpy.ndarray) – An array to transform through dot product.

  • wt (numpy.ndarray) – An array of weights.

  • kwargs (dict) – Additional keyword arguments. Not used by this function.

Returns:

out – A dot product transformed array.

Return type:

numpy.array