Skip to content

Commit caa26aa

Browse files
committed
fixed filesize error in fromfile in support of Issue #219
1 parent 684dcd7 commit caa26aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/markdown/ReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* added `putAlongAxis()` for **Issue #217** <https://numpy.org/doc/stable/reference/generated/numpy.put_along_axis.html>
66
* fixed random seeding for **Issue #218**
7+
* fixed error in `fromfile()` that limited filesize to 4GB for **Issue #219**
78

89
## Version 2.12.1
910

include/NumCpp/Functions/fromfile.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ namespace nc
6666
}
6767

6868
file.seekg(0, std::ifstream::end);
69-
const uint32 fileSize = static_cast<uint32>(file.tellg());
69+
const auto fileSize = static_cast<uint64>(file.tellg());
7070
file.seekg(0, std::ifstream::beg);
7171

7272
std::vector<char> fileBuffer;
@@ -75,7 +75,7 @@ namespace nc
7575

7676
if (file.bad() || file.fail())
7777
{
78-
THROW_INVALID_ARGUMENT_ERROR("error occured while reading the file");
78+
THROW_INVALID_ARGUMENT_ERROR("error occured while reading the file\n");
7979
}
8080

8181
file.close();

0 commit comments

Comments
 (0)