You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the examples, when logging printing an array,
var myArr = nj.array([2,3,4]);
console.log(myArr);
I get,
Object { selection: {…}, … }
in Firefox (and something similar in Safari). I can get the intended output with,
console.log(myArr.selection.data);
but this is a bit more long-handed. I would really like to use your package for a JavaScript API translation from Python, but this point is currently a hang up.
Is this behavior reproducible? Am I otherwise missing something here? Thanks!
Using: tagged release 0.16.0, including dist/numjs.min.js (I have also tried with the unminified copy and with the CDN copy of version 0.15.1, just to be sure).
The text was updated successfully, but these errors were encountered:
console.log( myArray.toString() )
to get a string representation, possibly condensed
or console.log ( myArray.tolist() )
to print the entire array as a js array both work for me.
I would be very careful about using .selection.data as when I tried slicing an array, tolist() produce an array of the correct size, but .selection.data was the size of the original array
Originally, numjs supports to use console.log(myArray) to achieve toString's effect in Node.js. But Node.js has changed its API for the inspect part so it will not work anymore. I've published a forked package to use the new inspect API in Node.js, https://www.npmjs.com/package/@d4c/numjs.
Following the examples, when logging printing an array,
I get,
in Firefox (and something similar in Safari). I can get the intended output with,
but this is a bit more long-handed. I would really like to use your package for a JavaScript API translation from Python, but this point is currently a hang up.
Is this behavior reproducible? Am I otherwise missing something here? Thanks!
Using: tagged release 0.16.0, including dist/numjs.min.js (I have also tried with the unminified copy and with the CDN copy of version 0.15.1, just to be sure).
The text was updated successfully, but these errors were encountered: