Skip to content
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

more general cumsum and a 'tile' (repmat) method #7

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jdleesmiller
Copy link

I've added two NArray methods that might be of interest:

  1. 'cumsum' for arrays with more than one dimension; the existing version only works for vectors. The new cumsum! calls the old cumsum! if dim is 1, so there should be minimal impact.
    Commit: 99b798d

  2. a 'tile' method that behaves mostly like matlab's 'repmat,' which is useful for creating block matrices.
    Commits: ea8c7f0, cbdcdc3

The methods are written in Ruby (not C yet). Unit tests are included; they use the standard Test::Unit, which the existing tests don't use, so I've added test/unit_tests to run just the new tests. I'm not sure what the best way to set this up is.

Commits 4e3f8da and b4e2798 are my mistakes, and they can be ignored; they are undone by 435ba76.

If you have any questions, don't hesitate to ask. Comments very welcome.

And thanks for putting together this great library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant