Currently, when one gives non-Daru::Index object to Daru::DataFrame#reindex_vectors method, exception of NoMethodError is raised instead of ArgumentError, the intended exception.
Reason is that when raiseing the exception, an non-existing variable of new_index is referenced. I think this was caused by simply copying the code from reindex method.
This PR fixes this and when non index is given, it properly throws ArgumentError.
Currently, when one gives non-
Daru::Index
object toDaru::DataFrame#reindex_vectors
method, exception ofNoMethodError
is raised instead ofArgumentError
, the intended exception.Reason is that when
raise
ing the exception, an non-existing variable ofnew_index
is referenced. I think this was caused by simply copying the code fromreindex
method.This PR fixes this and when non index is given, it properly throws ArgumentError.