Skip to content

Commit 836ffbc

Browse files
committed
Deploying to stdlib-fpm from @ 5ad2837 🚀
1 parent d01ce7c commit 836ffbc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/stdlib_io_npy_load.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2683,12 +2683,12 @@ subroutine get_descriptor(io, filename, vtype, vshape, stat, msg)
26832683

26842684
if (major > 1) then
26852685
header_len = ichar(buf(1)) &
2686-
& + ichar(buf(2)) * 2**8 &
2687-
& + ichar(buf(3)) * 2**16 &
2688-
& + ichar(buf(4)) * 2**32
2686+
& + ichar(buf(2)) * 256**1 &
2687+
& + ichar(buf(3)) * 256**2 &
2688+
& + ichar(buf(4)) * 256**3
26892689
else
26902690
header_len = ichar(buf(1)) &
2691-
& + ichar(buf(2)) * 2**8
2691+
& + ichar(buf(2)) * 256**1
26922692
end if
26932693
allocate(character(header_len) :: dict, stat=stat)
26942694
if (stat /= 0) return

src/stdlib_io_npy_save.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ pure function to_bytes_i4(val) result(str)
5757
!> String of bytes
5858
character(len=4) :: str
5959

60-
str = achar(mod(val, 2**8)) // &
61-
& achar(mod(val, 2**16) / 2**8) // &
62-
& achar(mod(val, 2**32) / 2**16) // &
63-
& achar(val / 2**32)
60+
str = achar(mod(val, 256**1)) // &
61+
& achar(mod(val, 256**2) / 256**1) // &
62+
& achar(mod(val, 256**3) / 256**2) // &
63+
& achar(val / 256**3)
6464
end function to_bytes_i4
6565

6666

0 commit comments

Comments
 (0)