Closed duboism closed 10 years ago
Good catch! I'll fix this.
However, note that the package currently assumes that all vectors have shape (n, 1), so the start_vectors module should really only take an integer argument, n, that is the number of elements in the vector.
Another thing: The start_vectors module is in the wrong place, it should not be in the root of the library. Should we put it in the utils package?
I fixed this. Now the start vectors only take a number of variables, size, and return a vector of shape (size, 1).
I also moved the start vectors to utils.
Hello,
The
RandomStartVector
class cannot generate rank 1 arrays (i.e. vectors):The error comes from the
maths.norm
function which suppose that shape is 2 dimensional. Therefore the bug also affectsOnesStartVector
when using thenormalise=True
option. I think that other classes are safe.As you probably know, in numpy a
(10, 1)
array is not exactly the same than a(10, )
array and, in some situation, the latter is more convenient so it may be useful to fix that. This is rather trivial.