Closed aplavin closed 3 months ago
Looks like @distributed
with hcat
has inconsistent output when 1:k is a singleton:
using Distributed
@distributed (hcat) for i in 1:1; 2i; end
2
@distributed (hcat) for i in 1:3; 2i; end
1×3 Matrix{Int64}:
2 4 6
Seems like a flaw in @distributed
to me because hcat(2)
returns a 1 by 1 array so is self consistent.
Before line 101, perhaps just add X = reshape(X, n, k)
at least for k=1 case.
When
Distributed.nprocs() == 1
:When
Distributed.nprocs() > 1
:Seems like this is caused by https://github.com/ahwillia/NonNegLeastSquares.jl/blob/2c932bb7cee975db31258555596481aa24351ee8/src/pivot.jl#L97-L106, but not sure how to cleanly fix those lines.