Skip to content

'nx' - NumeriX module #6

@cadebrown

Description

@cadebrown

Already started the types, but need more functionality (i.e. transposing, reorganizing, sub-scripting, and so forth)

Operations are started, but of course more can always be added. Some difficulties now:

  • Complex variants of trig functions have a lot of reused code (i.e. sin of complex uses sinh of complex internally), so if we have them all in separate files, there is a lot of duplicated code

Submodules:

nx.rand

Random number generation, the main type is nx.rand.State, which implements methods:

  • randb(num=1): return 'num' random bytes
  • randf(shape=none): return random float in [0, 1)
  • normal(mean=0, stddev=1, shape=none) - Guassian distribution
  • ...

nx.la

Linear algebra library, mainly concerned with solvers, and some BLAS routines. For example:

  • matmul(X, Y, R=none) - calculate matrix multiply between shapes [..., M, N], [..., N, K] (extra dimensions represent batched operations)
  • solve(A, b) - solve for 'x' in the equation Ax = b
  • gmres(A, b, x0, niter=16) - solve for an approximation to the solution Ax = b using the GMres method

nx.fft

FFT (Fast Fourier Transform) library, concerned with applying time and frequency transforms

  • nx.fft(X, axes=none, R=none) - forward FFT
  • nx.ifft(X, axes=none, R=none) - inverse FFT

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestmoduleRelating to a standard module

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions