Code Monkey home page Code Monkey logo

pharo-ndarray's Introduction

Pharo-NDArray

Package for multidimensional arrays and common array programming language algorithms.

Example

NDArray withAll: 9 iota "Step 1"
   :> reshape: #(3 3)   "Step 2"
   :> + 10              "Step 3"
   :> reduce: #+        "Step 4"
   :> asArray           "Step 5"

Each step of the above code creates the following:

"Step 1:"
1 2 3 4 5 6 7 8 9

"Step 2"
1 2 3
4 5 6
7 8 9

"Step 3"
11 12 13
14 15 16
17 18 19

"Step 4"
36 45 54

"Step 5"
36 45 54 "Array (no longer NDArray)"

API

Adverbs

  • collect:
  • outerProduct:with:
  • reduce:
  • reduceFirst:
  • scan:
  • triangleProduct:
  • triangleProduct2:
  • upperProduct:
  • upperProduct2:
  • windowed:reduce:

Verbs (Scalar Monadic)

  • abs
  • ceiling
  • exp
  • factorial
  • floor
  • invFactorial
  • not
  • reciprocal
  • roll
  • sign

Verbs (Scalar Dyadic)

  • %
  • *
  • +
  • -
  • <
  • <=
  • >
  • >=
  • = (to be removed)
  • eq:
  • min:
  • max:

Verbs (Monadic)

  • all
  • any
  • asString
  • first
  • enlist
  • ints
  • invIota
  • invWhere
  • isEmpty
  • max
  • maxs
  • min
  • mins
  • mix
  • negated
  • ravel
  • reverse
  • size
  • split
  • sum
  • sums
  • transpose
  • unique
  • where

Verbs (Dyadic)

  • drop:
  • filter:
  • filterPred:
  • gather:
  • intersection:
  • matches:
  • memberOf:
  • notMatches:
  • partition:
  • reshape:
  • rotate:
  • take:
  • without:

Trains / Combinators

  • binaryAtop:with:with: (blackbird)
  • binaryFork:with:with:with: (golden eagle)
  • hook:with: (starling)
  • fork:with:with: (phoenix)
  • over:with:with: (psi)

pharo-ndarray's People

Contributors

codereport avatar dvmason avatar

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.