Skip to content

Commit

Permalink
Convert BigInt spatial coordinates to Number
Browse files Browse the repository at this point in the history
  • Loading branch information
katamartin committed Jan 17, 2025
1 parent 42d3f20 commit 2a692a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/utils/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,13 @@ export const getVariableLevelInfo = async (
['X', 'Y']
.map((axis) => arrays[cfAxes[name][axis]])
// TODO: handle chunked spatial coordinates
.map((arr, i) => arr.get_chunk([0], { headers: headers[name] }))
.map((arr, i) =>
arr
.get_chunk([0], { headers: headers[name] })
.then((c) =>
ndarray(Float32Array.from(c.data, Number), arr.chunk_shape)
)
)
)

const axes = ['X', 'Y'].reduce((accum, key, i) => {
Expand Down

0 comments on commit 2a692a7

Please sign in to comment.