~javiljoen

Cape Town

http://javiljoen.net

Trackers

~javiljoen/yatte

Last active 8 months ago

~javiljoen/lttb

Last active 1 year, 4 months ago

~javiljoen/LTTB.R

Last active 2 years ago

#1 Test against Python 3.10 8 months ago

Comment by ~javiljoen on ~javiljoen/yatte

All checks pass.

REPORTED RESOLVED BY_DESIGN

#1 Test against Python 3.10 8 months ago

~javiljoen assigned ~javiljoen to #1 on ~javiljoen/yatte

#1 Test against Python 3.10 8 months ago

Ticket created by ~javiljoen on ~javiljoen/yatte

#1 Cannot downsample to ≥ half the number of points 2 years ago

Comment by ~javiljoen on ~javiljoen/LTTB.R

Here is a function for correctly splitting the data into bins (similar to numpy.array_split):

https://stackoverflow.com/a/45206984/4145144

#1 Cannot downsample to ≥ half the number of points 2 years ago

Ticket created by ~javiljoen on ~javiljoen/LTTB.R

When trying to downsample a matrix with n rows to any value ≥ 0.5 n, the following error is returned:

Error in apply(data[floor(i * bin_width + 1:bin_width), ], 2, mean) : 
  dim(X) must have a positive length

Steps to reproduce:

n = 20
data = data.frame(X=seq_len(n), Y=rnorm(n))
LTTB(data, n_bins=n/2)  # Error
LTTB(data, n_bins=n/2 - 1)  # Works fine

[Imported from https://github.com/javiljoen/LTTB/issues/2]