Skip to content

Commit

Permalink
Merge 551630b into 9ab7f92
Browse files Browse the repository at this point in the history
  • Loading branch information
Takehiro Sano authored Nov 2, 2020
2 parents 9ab7f92 + 551630b commit 4fc270f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/interf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ function nnmf(X::AbstractMatrix{T}, k::Integer;
tol::Real=cbrt(eps(T)/100),
verbose::Bool=false) where T

eltype(X) <: Number && all(X .>= zero(T)) || throw(ArgumentError("The elements of X must be non-negative."))

p, n = size(X)
k <= min(p, n) || throw(ArgumentError("The value of k should not exceed min(size(X))."))

Expand Down

0 comments on commit 4fc270f

Please sign in to comment.