Question: Rank LinearAlgebra; Statistics:-Rank

Hi all,

I have a problem with 'Rank' when trying to find the rank of a matrix.

For some purpose, I have to load both with(LinearAlgebra) and with(Statistics) packages.

Without using Statistics[Tally], (not loading the Statistics package), the Rank works fine.

With the Statistics package, Rank sometimes gives an error, saying,


Error, (in Statistics:-Rank) expected 1-dimensional Array, but .....

I now fix this by using LinearAlgebra[Rank].

 

I just wonder, what's the general guidance when writing procedures that loads various packages?

 

Many thanks,

 

Casper

Please Wait...