Unknown Variable middle-1 in the ArrayMedian Function #2

Closed
opened 2024-10-22 15:46:22 +00:00 by briantsaunders · 1 comment
briantsaunders commented 2024-10-22 15:46:22 +00:00 (Migrated from github.com)

When calling the arrayMedian function and only passing three values in the array it throws an error saying unknown variable: middle-1.

#import "@preview/statastic:0.1.0": arrayMedian

#let data = (46, 93, 360)
#let median = arrayMedian(data)

Changing col.at(middle-1) to col.at(middle - 1) appears to fix the issue.

When calling the `arrayMedian` function and only passing three values in the array it throws an error saying `unknown variable: middle-1`. ```typst #import "@preview/statastic:0.1.0": arrayMedian #let data = (46, 93, 360) #let median = arrayMedian(data) ``` Changing `col.at(middle-1)` to `col.at(middle - 1)` appears to fix the issue.
dikkadev commented 2024-10-23 10:55:26 +00:00 (Migrated from github.com)

This is fixed in d525748d4a
and will be in version 1.0.0 when that is merged https://github.com/typst/packages/pull/1158

This is fixed in d525748d4a3877fffde27562d8a10b5652c17e43 and will be in version 1.0.0 when that is merged https://github.com/typst/packages/pull/1158
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
graveyard/typst-statastic#2
No description provided.