diff --git a/C/vector.c b/C/vector.c index 31afaddba5bd2eb45f37c981e815965b725ca08c..31b2502d2e9feb3ba65aa30c0506b8923644ccd3 100644 --- a/C/vector.c +++ b/C/vector.c @@ -40,7 +40,7 @@ double_vector_t *init_vector(uint32_t N) * with values from 0 to N excluded. * * @param N The number of dimensions. - * @return A dynamically allocated vector : [0,1..N] + * @return A dynamically allocated vector : [0,1..N-1] */ double_vector_t *iota(uint32_t N) { diff --git a/C/vector.h b/C/vector.h index d1df6114d5aef1f4d67be977e003228f76f312c1..6f1820bb5c0d9a21a3db713648c2eb3230e33f0f 100644 --- a/C/vector.h +++ b/C/vector.h @@ -36,7 +36,7 @@ double_vector_t *init_vector(uint32_t N); * with values from 0 to N excluded. * * @param N The number of dimensions. - * @return A dynamically allocated vector : [0,1..N] + * @return A dynamically allocated vector : [0,1..N-1] */ double_vector_t *iota(uint32_t N); /** @brief diff --git a/Python/load_vec.py b/Python/load_vec.py index 70b5d5fa355806d393bf34eaeef1667134a49c79..17880a18b4fccf86b61cad3cd8e90b1aead07926 100644 --- a/Python/load_vec.py +++ b/Python/load_vec.py @@ -3,7 +3,7 @@ from typing import Tuple METADATA_SIZE = 6 -def _parse_metada(metadata: bytes) -> Tuple[type, int]: +def _parse_metadata(metadata: bytes) -> Tuple[type, int]: """ Parse the metadata for a vec file. @@ -42,7 +42,7 @@ def load_vector(filename: str) -> np.ndarray: # Read our metadata struct metadata = file.read(METADATA_SIZE) - datatype, nb_components = _parse_metada(metadata) + datatype, nb_components = _parse_metadata(metadata) array = np.fromfile(file, dtype=datatype, count=nb_components)