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

Nim: How to check if a float is nan or inf?
How to help nim prove that indices from an iterator are disjoint (within parallel section)?
printing an array in Nim using echo
Nim stored procedure reference in tuple
Remove constant after compilation in Nim
How do I use a `concept` in Nim?
how to create an IntSet on the heap in nim?
How to benchmark few lines of code in nim?
what is nim type definition for generic procedure?
Does a nim library contain an argsort implementation or wrapper?
nim jester how to change static route and directory
nim linker error while linking to libsodium
Can countup and countdown iterators in Nim language be used in variable declaration?
How do I write unit test for code that should fail to compile in Nim?
Difference between void proc and void proc with discard
nim nimscript is not executing commands

Categories

HOME
sonarqube
go
oracle12c
jpa
nvd3.js
yahoo-finance
saml-2.0
static-site
switch-statement
azure-container-service
crystal-lang
vert.x
pkcs#11
joomla3.0
owin
enthought
windows-ce
enterprise-architect
parameter-passing
package.json
red5
asp.net-mvc-viewmodel
smartclient
boost-icl
breadth-first-search
pagespeed
jboss6.x
bulletphysics
shared
delimiter
progress-bar
spotipy
sinch
ceylon
carrierwave
winpe
magento-1.8
aws-codecommit
utorrent
r-grid
spring-security4
instantiation
hunspell
hibernate-search
installscript
reverse
searchkit
salesforce-communities
sql-server-ce
git-rewrite-history
nohup
railstutorial.org
ogc
wmp
install.packages
avcapturedevice
show-hide
apache-directory
memory-mapping
jide
yii2-api
mschart
mongotemplate
arules
check-mk
css-transforms
mach-o
janus
cpu-cache
rmongo
materialized-path-pattern
omxplayer
reporting-services-2012
file-uri
angular-ui-typeahead
query-by-example
data-protection
grass
piracy-prevention
design-principles
directdraw
character-replacement
toran-proxy
google-books
phonertc
toolkit
atoi
botan
git-ftp
nsurlsessiondatatask
umlgraph
bcache
uncaught-typeerror
genymotion-call
jama
lambda-architecture
parallel-testing
malformedurlexception
ray
buffering
spring-remoting
android-framework
artemis
process-explorer
onload-event
zope.interface
inkcanvas
jquery-address
pinch
landscape-portrait
update-statement
listactivity
tournament
mbeans
umra
cdonts
office-2007
sifr3
online-storage

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