Skip to main content

Requires Transcrypt commit ba2c278 (not pip-installable, get it from GitHub)

Numscrypt is a port of a small part of NumPy to Transcrypt using JavaScript typed arrays. While some attention is paid to speed, e.g. by optimizing for-loops and operators in Transcrypt, that is currently not the main focus.

Whereas NumPy often has multiple way to do things, Numscrypt focuses on one obvious way. The clearest example is the NumPy type matrix type, that is a specialization of ndarray with confusingly deviating use of some operators. In Transcrypt matrix is deliberately left out, to keep it lean.

One thing Numscrypt does support is the use of views, i.e. references to parts of existing arrays rather than copies. As with NumPy, views are implemented using strides and offsets.

Parts of the code can later be replaced by things like asm.js and simd.js, or, better even, GPGPU code. There’s not yet a clear winner in this area. This implementation is usable as a skeleton to try out those new technologies in parts of the code where speed matters most.

It may seem attractive to compile everything from C++ to asm.js, but the downloads would become very bulky and the readability approaching zero. Or wouldn’t it? Forking and experimenting highly encouraged!!

As with Transcrypt, the eventual goal is not to completely copy a desktop programming environment. Rather a lean and mean subset is sought that can still be very useful, e.g. for science demo’s in the browser.

Jacques de Hooge, Rotterdam, Netherlands

Logo

The first computers were used… to compute

What’s new

N.B. Always use the newest version of Transcrypt to be able to use the newest features of Numscrypt.

  • Low hanging fruit optimizations done for complex and real arrays, e.g. multiplication in natural order 30x faster

  • For educational and demonstration purposes a simple, non-optimized implementation of complex arrays was added

  • Ndarray’s mixable with scalars for overloaded ops

  • Overloaded unary minus added

  • Preliminary optimizations, speedup 70x for inversion, 10x for multiplication (default: optimize for speed)

  • Several bugs fixed for working with non-default strides

  • Start made with module linalg, matrix inversion added + testcase

  • Overloaded LHS and RHS slicing added to ndarray

  • Readme adapted

  • Hsplit, vsplit, hstack, vstack added

  • Transpose can now deal with non-default strides

  • Tuple stripping optimization added for simple indices

  • Overloaded operators added for simple indices e.g. matrix [2, 3, 2] + autotest

  • Overloaded operators added for +, -, *, / and @, not yet mixable with scalars + autotest

  • Setup adapted to Linux’ case sensitivity

  • Dependencies added to setup.py

  • Changes package name to lowercase

  • Modest beginning made with ndarray + autotest for it

Other packages you might like

Licence

Copyright 2016 Jacques de Hooge, GEATEC engineering, www.geatec.com

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Release files for Numscrypt 0.0.29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Numscrypt 0.0.29
File Size Uploaded
Numscrypt-0.0.29.zip 9.2 MB Details

Release files / Numscrypt-0.0.29.zip

Download URL Numscrypt-0.0.29.zip
Size 9.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3bbaf54d6ccbf3970278a9249d9e25a6255bd009f91e2e2964dfae72566280b5
BLAKE2b-256 checksum
How to use checksums
1b4bc2ef52b843fb7df39f7d1cfe744120b60c05fea66aa5fd3d40cf188e3505
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.0.40

1 release file

0.0.39

1 release file

0.0.38

1 release file

0.0.37

1 release file

0.0.36

1 release file

0.0.35

1 release file

0.0.34

1 release file

0.0.33

1 release file

0.0.31

1 release file

0.0.30

1 release file

This release

0.0.29 This release

1 release file

0.0.27

1 release file

0.0.26

1 release file

0.0.25

1 release file

0.0.24

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page