Fork me on GitHub

i came up with something like this.. (defn argmax [v] (key (apply max-key val (zipmap (range) v))))


didnt know if there was a more efficient impl for core.matrix


@jstokes In neanderthal, there is iamax function that gives you the index of such element. Perhaps core.matrix have similar method that you can use to later retrieve the value.


thanks @blueberry - i’m getting a class not found exception for clojure.lang.Tuple, but I’ll play around with this when I get a little more time


@jstokes are you sure you've tried the latest version? that Tuple thing is not related to neanderthal, but to some changes in Clojure's RC versions. Anyway, if the release is not working, pull the snapshot from the github and there should be no problems - i compiled the same a few days ago. Additionally, make sure you use Java 8, and not an earlier version.


@jstokes: And try with Clojure 1.8.0-RC5 just to make sure...