can anyone get numeric.js imported?

I’m having a lot of trouble with this library (but I admit I am no observable require expert).

The website is now down (still on wayback) but code is still on github and distributed various places, and it can e.g. be found at

I can’t get require to work, and my attempts at just eval-ing the string source isn’t working either.

Edit: apparently a topic can only have one “answer”.

mootari and bgchen’s both work. Respectively:

numeric = require('').catch(() => window.numeric)
numeric = require('')

Try this:

numeric = require('').catch(() => window.numeric)

That returns a function, whereas the “numeric” name is supposed to be an object with a number of properties representing various numerical functions.

How about:

numeric = require('')

(You can see this in action in a few notebooks by searching Observable for “numericjs”)


Ah thank you! That one does work at first glance.

All the properties are there, e.g. numeric.version.


Oh huh. So what’s the function part about? I was trying to call it before, and getting inscrutable errors out.

Supposedly node support. ¯\_(ツ)_/¯

Sure would be great if we could get a new owner of that repo. Although there are alternatives poking up.

This looks interesting: a port of python/numpy etc with a JavaScript interface…

Folks looking for alternative linear algebra libraries might check out these I found:

If anyone knows about good reviews evaluating / comparing these or other libraries (e.g. comparing their available tools, APIs, performance, …) please do tell.


For folks who want to use numeric, I wrote a quick version of it with support for UMD and ES modules, so you can do

numeric = require("@tmcw/numeric@1.0.2")

// or
numeric = import("@tmcw/numeric@1.0.2")