raleng / nmf

Non-negative matrix factorization using MUR, ANLS, ADMM or AO-ADMM.
Other
10 stars 2 forks source link

Add type when constructing inhomogeneous numpy array #2

Closed raleng closed 1 year ago

raleng commented 1 year ago

Description

Numpy expects a homogeneous array of elements with fixed dimensions. By passing in the object type directly, allowing for elements of different sizes, the error from #1 is fixed.

You'll loose all the benefits of Numpy doing this, but this is the most minimal change fixing #1, and the array is only an intermediary data structure anyways.