-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broadcasting and new functions #56
Open
orangeduck
wants to merge
23
commits into
sloisel:master
Choose a base branch
from
orangeduck:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n now optional. Added mathematical constants.
…down in numeric.abs on the benchmark...
…nner and outer products. Fixed bug with index function. Removed debug output from csv parser.
Wow, that looks fantastic @sloisel just looking into some analysis libraries in the javascript world and some of the functionality here looks great for me to consider this. Are there any blocking issues for this to get merged? |
Fix reciprocal of a complex number with zero imaginary part
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Here are the updates I've worked on to support broadcasting. As well as broadcasting I worked on allowing mapreduce functions to work over a specified axis. Also I have added a large number of new functions to the library covering a bunch of domains. My inspiration has been Numpy, so most of the new functions semantics are meant to match those of Numpy. If this isn't the case you can consider it a bug.
Now is the time for name changes if you can think of better names for any of my new functions please go ahead and re-name them. I've also not yet updated the version number.
I should mention so that you can get an idea of my use-case is that the reason I've contributed lots of these updates is because I'm working on a Javascript machine learning library using numeric and porting lots of code from Numpy.
Sorry that some of the commits are so messy. I made lots of changes which I later changed to something else or removed completely so the easiest file to examine might be
numeric.js
in the latest commit. I should have kept a change log but unfortunately I didn't. So here is a change log now. Hopefully I've not forgotten anything.numeric.pointwise
to support broadcasting. New interface is explained in documentation.numeric.mapreduce
to support folding over an axis. Main requirement now is that numeric functions are used, not JS operators. New method of using is also explained in documentation.numeric.inf
,numeric.sup
to documentation. Addednumeric.arginf
andnumeric.argsup
.numeric.mean
numeric.variance
numeric.std
numeric.empty
,numeric.ones
,numeric.zeros
for Array creation.numeric.range
,numeric.logspace
for Array creation.numeric.flatten
,numeric.reshape
,numeric.flip
,numeric.fliplr
,numeric.flipup
,numeric.rot90
,numeric.roll
,numeric.wrap
,numeric.concat
,numeric.stack
,numeric.hstack
,numeric.vstack
,numeric.dstack
for shape manipulation.numeric.slice
andnumeric.sliceeq
for accessing arrays using slice objectsnumeric.mask
andnumeric.maskeq
for accessing arrays using Boolean arraysnumeric.index
andnumeric.indexeq
for accessing arrays using Integer arraysnumeric.clip
andnumeric.saturate
functions to clip values to given rangenumeric.when
function to act like pointwise ternary operatorz = b ? x : y
numeric.bool
function to cast a JS value to a boolean valuey = !!x
numeric.inner
andnumeric.outer
numeric.kron
numeric.setDiag
numeric.pi
andnumeric.e