Skip to content

Commit

Permalink
Fix issue#28
Browse files Browse the repository at this point in the history
  • Loading branch information
Takehiro Sano committed Nov 2, 2020
1 parent 9ab7f92 commit 551630b
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 551630b

Please sign in to comment.