Clever exploitation of the fact that our data consists purely of small integers!

I wish numpy had a argpartition for 2-keys. lexsort comes close, but it's a full-fledged sort and has the annoying additional requirement of named arrays. Which makes my solution look... uglier than otherwise.

Hey dke! I wonder what does this mean "yes it is possible - Expected: true, instead got: false"

I get this warning but I can'T see for which test case it did not pass. Is it normal to not see the test case? My function passes many cases but not the some of edgy ones, I would like to see how edgy they are :)

although i thought it would be a another challenge for new-comers to trucate instead of just rounding to some decimal places (rounding is easy). anyway if you say i will do that... althought i was forgotten while traslating that into python, now the snake is back hope you feel good. :)

Please do not round ( or truncate ) floating point values. Compare with a margin for error ( assertApproxEquals in JS ).

If I get 10.00039999999999999999 instead of 10.000400000000000001, I'm still screwed. Rounding instead of truncating just moves this problem by 5e-something.

NB: Math.hypot gives different answers than Math.sqrt.

Fixed, if you find any other mistake, post them and I'll take a look, thanks.

"fill the one of jar "

And why don't you propose how to improve it?

Poor grammar

Clever exploitation of the fact that our data consists purely of small integers!

I wish

`numpy`

had a`argpartition`

for 2-keys.`lexsort`

comes close, but it's a full-fledged`sort`

and has the annoying additional requirement of named arrays. Which makes my solution look... uglier than otherwise.Hey dke! I wonder what does this mean "yes it is possible - Expected: true, instead got: false"

I get this warning but I can'T see for which test case it did not pass. Is it normal to not see the test case? My function passes many cases but not the some of edgy ones, I would like to see how edgy they are :)

Added.

Sample tests are still using

`Test.expect`

.Got it did it! thanks i hadn't thought about this problem wow...

Removed 'the hard code' thanks :)

that seems quite reasonable gonna do it

Thanks for saving me from future troubles...

Fixed some typos and reworded a bit.

although i thought it would be a another challenge for new-comers to trucate instead of just rounding to some decimal places (rounding is easy). anyway if you say i will do that... althought i was forgotten while traslating that into python, now the snake is back hope you feel good. :)

Please do not round ( or truncate ) floating point values. Compare with a margin for error (

`assertApproxEquals`

in JS ).If I get

`10.00039999999999999999`

instead of`10.000400000000000001`

, I'm still screwed. Rounding instead of truncating just moves this problem by`5e-something`

.NB:

`Math.hypot`

givesdifferentanswers than`Math.sqrt`

.## Loading more items...