Giter Club home page Giter Club logo

numericalnim's Introduction

scinim

The core types and functions of the SciNim ecosystem

numericalnim's People

Contributors

barroff avatar clonkk avatar hugogranstrom avatar narimiran avatar ringabout avatar vindaar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

numericalnim's Issues

Improve documentation

Now that we finally have a documentation you can really see what procs are documented and which are not.

It could also be nice with a paragraph at the top of each module as well to describe what it provides and recommended methods.

  • Differentiate
  • integrate
  • interpolate
  • ode
  • optimize
  • rbf
  • utils

interpolate.nim Error: cannot instantiate: 'T'

Many thanks for this very interesting package.
I've tried the examples in your documentation.
The following CubicSpline example does not compile on my Nim (devel)

import numericalnim
var X = @[0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0] # seconds
var Y = @[0.0, 4.0, 6.0, 6.5, 6.4, 6.2, 0.0] # meters/second
let spline = newCubicSpline(X, Y)
echo spline.eval(5.0)
#[
NumNim_BUG.nim(6, 6) template/generic instantiation from here
$HOME/.nimble/pkgs/numericalnim-0.6.0.1/numericalnim/interpolate.nim(182, 27) Error: cannot instantiate: 'T'
]#

Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-01-07
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: 89a21e4ec71e705833d2aacd069e291cf41a19c6
active boot switches: -d:release

Check for duplicate x-values when sorting dataset

If there are duplicates in x-value in a dataset there are two scenarios:

  1. If the y-values are the same, remove all but one of the duplicates
  2. If the y-values aren't the same, raise exception.

While we are at it we should also revamp sortDataset to accept a variable number of input arrays. Should we use array[N: static int, seq[T]] as both input and output then? Nah I'll just do varargs[seq[T]] and sort along the first sequence only and keep track of the indices for the rest. That should be efficient enough. T prepare for VectorLike I should probably not use varargs though, will go with openarray.

Barycentric interpolator produce a codegen error with --gc:arc

var ptsCoord = newSeq[array[2, float]]()
# corners
ptsCoord.add([-200.0,-150.0])
ptsCoord.add([-200.0,150.0])
ptsCoord.add([200.0,-150.0])
ptsCoord.add([200.0,150.0])
var ptsValue = @[0.0,1.0,4.0,5.0]
# extra pts
ptsCoord.add([0.0,-150.0])
ptsCoord.add([0.0,150.0])
ptsCoord.add([0.0,0.0])
ptsValue.add(8.0)
ptsValue.add(1.0)
ptsValue.add(1.0)
let bary = newBarycentric2D(ptsCoord.toTensor(), ptsValue.toTensor())

Compiled with nim cpp --gc:arc with Nim 1.6.0

It seems related to Vector2 in cdt

Improve error handling and error messages

Stage 1: Improve the error messages (specifically trimAndSortDataset)

Stage 2: improve error handling. Some universal @SciNim way of reporting back non-fatal error to the user. For example that the maximum number of iterations was reached.

Update README

  • Remove recent major changes, they aren't very recent anymore.
  • The Gitter channels aren't really relevant either. Link to Science channel on Matrix and Discord instead.
  • Add link to scinim/getting-started

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.