Skip to content

exceptions in kde #37

Closed
alang9 opened this Issue Aug 29, 2012 · 1 comment

2 participants

@alang9
alang9 commented Aug 29, 2012

Maybe these should be two separate issues, but here goes:

> let f x y = kde x $ Data.Vector.Unboxed.replicate y 0.0
> f 2 1
(fromList [-0.1,0.1],fromList [6.255700138464551,3.744299861535448])
> f 1 1
*** Exception: Statistics.Math.log2: invalid input
> f 1 2
*** Exception: ./Data/Vector/Generic/Mutable.hs:576 (read): index out of bounds (-9223372036854775808,1)
@Shimuuar
Collaborator

dct is at fault.

>>> dct $ U.replicate 1 0
*** Exception: Statistics.Math.log2: invalid input

Even worse:
>>> dct $ U.replicate 3 0
[0.0,0.0]

Reordering of vector's elements in the dctWorker works improperly for samples with odd sizes

@Shimuuar Shimuuar added a commit to Shimuuar/statistics that referenced this issue Sep 14, 2012
@Shimuuar Shimuuar Disallow grids with single point.
Such grids don't make sense anyway.

Fix #37
5a86a7e
@Shimuuar Shimuuar added a commit that closed this issue Sep 14, 2012
@Shimuuar Shimuuar Fix bug in dct for vectors with length 1
It have to be treate specially. Also index permutaions do not wotk
for vectors that aren't power of two. E.g. dct [1,1,1] will produce vector
with length 2 insterad of error. So check were move to the outermost functions
It in  fact improves error messages

Fix #37
076b01e
@Shimuuar Shimuuar closed this in 076b01e Sep 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.