I have been trying to use npv to calculate the net present value. The interest rate and cashflows are from a row of matrix, look like this:

npv(norm(IRR_adj[:,1]),nb,AssetsCF[:,1])

where IRR_add is 1×1185 Array{Float64,2} and I use norm to convert it to a float64; AssetsCF is 101×1185 Adjoint{Float64,Array{Float64,2}}. the expression above is to take Row 1 in Arrays

The error message says:

LoadError: MethodError: no method matching npv(::Float64, ::Int64, ::Array{Float64,1})

Closest candidates are:

npv(::Real, !Matched::AbstractArray{var"#s17",1} where var"#s17"<:Real) at C:\Users\XiaopingWang.julia\packages\NPFinancial\x1dsh\src\NPFinancial.jl:268

in expression starting at C:\Users\XiaopingWang\Desktop\Learning_Julia\Assets_IRR_3.jl:38

top-level scope at Assets_IRR_3.jl:38

include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088

Could someone help to point out where is wrong in code please?

Thanks,

Ping.