nim


Does a nim library contain an argsort implementation or wrapper?


I am looking for a version of argsort, such as exists in numpy or in fortran
Is there an implementation of argsort in nim ... or accessible to nim in some library? It seems a bit surprising that its missing.
UPDATE
The following seems to work for argsort:
proc argsort[T](a : T) : seq[int] =
result = toSeq(0..a.len - 1)
sort(result, proc (i, j: int): int = cmp(a[i], a[j]))
Presumably, though, it could be more efficient written natively and avoiding the function pointer....

Related Links

MD5 on an array, array[0..63, uint8] to cstring conversion
Converting a seq[char] to string
Nim: On mac, cannot open standard import
How to compare two typedesc in a template for equality
Is there a “default” file name that can be used for importing modules?
Unable to get StringStream created from marshal to output the data
Initialize a seq of seqs
How to change Nim compiler output file location and name
Compile-time Call Count in Nim
How To Convert Slice To Sequence?
Cannonical way to do circular dependency in Nim
toSeq(some_string) Type Mismatch
Why is there a warning not to use system.cmp[string] for Nim string comparison
What's the the best way to get the current operating system?
How to get the type of a value as string?
Loop results to array

Categories

HOME
service-worker
asp.net-web-api
grok
search
localization
wakanda
google-spreadsheet
twig
rsa
numbers
pascal
oracle-apex-5
composite-primary-key
package
knitr
owl-carousel
static-site
simulink
visual-studio-emulator
square
interpolation
maxscript
nuget-package
frontend
recordrtc
extjs4.2
owin
commonjs
stellar.js
favicon
renjin
flash-player
scrolltop
bitnami
internationalization
searchview
firefox-addon
dreamweaver
html5-appcache
foreign-keys
swagger-2.0
asp.net-core-webapi
microsoft-ocr
user-experience
spring-async
monit
displaytag
interpreter
beta
perlbrew
tiki-wiki
underscore.js
paperjs
carrierwave
gitlab-api
recurring-events
kudu
testbed
playstation-portable
carriage-return
mnist
engine.io
amazon-ses
bc
parser-generator
sharp-snmp
memory-mapping
globalize
mschart
geotiff
launchctl
datamaps
carrot2
custom-font
mach-o
flyout
offline.js
rmongo
grails-plugin
webjars
burrows-wheeler-transform
udpclient
respondcms
deep
cda
dbamp
turbo-prolog
user-management
rasterize
vhosts
dynamics-nav-2016
tfs-workitem
roadkill-wiki
poppler
cgi-bin
baasbox
graphics2d
aspectj-maven-plugin
mraid
node-serialport
infosphere-spl
formview
tweenlite
trdion2011
lambda-architecture
mintty
grails-domain-class
cancellation
ios8-extension
decoupling
square-bracket
jeromq
oocss
beaker-testing
mvc-editor-templates
workitem
ui-select2
wp7test
tree-balancing
nokia-s40
kqueue
denied
winmain
quotation-marks
cac
easyb
drupal-fivestar
aspmenu
isapi-extension
burndowncharts
dojo-dnd
business-model

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App