Skip to main content

No project description provided

Project description

RoughPy Logo

RoughPy

RoughPy is a package for working with streaming data as rough paths, and working with algebraic objects such as free tensors, shuffle tensors, and elements of the free Lie algebra.

This library is currently in an alpha stage, and as such many features are still incomplete or not fully implemented. Please bear this in mind when looking at the source code.

Installation

RoughPy can be installed from PyPI using pip on Windows, Linux, and MacOS (Intel based Mac only, sorry not Apple Silicon support yet). Simply run

pip install roughpy

to get the latest version.

Alternatively, the wheel files can be downloaded from the Releases page.

Installing from source

RoughPy can be installed from source, although this is not the recommended way to install. The build system requires vcpkg in order to obtain the necessary dependencies (except for MKL on x86 platforms, which is installed via pip). You will need to make sure that vcpkg is available on your system before attempting to build RoughPy. The following commands should be sufficient to set up the environment for building RoughPy:

git clone https://github.com/Microsoft/vcpkg.git tools/vcpkg
tools/vcpkg/bootstrap-vcpkg.sh
export CMAKE_TOOLCHAIN_FILE=$(pwd)/tools/vcpkg/scripts/buildsystems/vcpkg.cmake

With this environment variable set, you should now be able to pip install either using the PyPI source distribution (using the --no-binary :all: flag), or directly from GitHub:

pip install https://github.com/datasig-ac-uk/RoughPy.git

It will take some time to build.

Usage

Following the NumPy (and related) convention, we import RoughPy under the alias rp as follows:

import roughpy as rp

The main object(s) that you will interact with are Stream objects or the family of factory classes such as LieIncrementStream. For example, we can create a LieIncrementStream using the following commands:

stream = rp.LieIncrementStream.from_increments([[0., 1., 2.], [3., 4., 5.]], depth=2)

This will create a stream whose (hidden) underlying data are the two increments [0., 1., 2.] and [3., 4., 5.], and whose algebra elements are truncated at maximum depth 2. To compute the log signature over an interval we use the log_signature method on the stream, for example

interval = rp.RealInterval(0., 1.)
lsig = stream.log_signature(interval)

Printing this new object lsig should give the following result

{ 1(2) 2(3) }

which is the first increment from the underlying data. (By default, the increments are assumed to occur at parameter values equal to their row index in the provided data.)

Similarly, the signature can be computed using the signature method on the stream object:

sig = stream.signature(interval)

Notice that the lsig and sig objects have types Lie and FreeTensor, respectively. They behave exactly as you would expect elements of these algebras to behave. Moreover, they will (usually) be convertible directly to a NumPy array (or TensorFlow, PyTorch, JAX tensor type in the future) of the underlying data, so you can interact with them as if they were simple arrays.

Support

If you have a specific problem, the best way to record this is to open an issue on GitHub. We welcome any feedback or bug reports.

Contributing

In the future, we will welcome pull requests to implement new features, fix bugs, add documentation or examples, or add tests to the project. However, at present, we do not have robust CI pipelines set up to rigorously test incoming changes, and therefor will not be accepting pull requests made from outside the current team.

Contributors

The full list of contributors is listed in THANKS alongside this readme. The people mentioned in this document constitute The RoughPy Developers.

License

RoughPy is licensed under a BSD-3-Clause license. This was chosen specifically to match the license of NumPy.

Changelog

Version 0.0.4:

  • Overhauled the RPY_CHECK macro so it now gives much better contextual information.
  • Readme updated to reflect PyPI installation with wheels.
  • Antipode is now implemented in libalgebra_lite, and exposed to Python for Free tensors.
  • Streams now carry a support interval, outside of which the signature will be return trivial.
  • Build requirements fixed for non x86 platforms.
  • Expanded coverage of pytype stub file.

Version 0.0.3:

  • Added datetime interval support.
  • Integrated schema reparametrisation into stream signature methods.
  • Fixed bug in names of scalar types, names now display correctly.
  • Fixed bfloat16 given wrong scalar type code.
  • Added half precision float and bfloat16 to py module
  • Added real partition class and Python interface.
  • Implemented simplify method on Streams.
  • Added polynomial coefficients
  • started an examples folder

Version 0.0.2-alpha:

  • Added datetime and timedelta object support to tick data parsing.
  • Expanded build system to include more versions of Python.
  • Stabilised compilation on all three platforms.
  • Fixed numerous bugs in the build system.

Version 0.0.1-alpha:

  • First alpha release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roughpy-0.0.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

roughpy-0.0.4-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

roughpy-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

roughpy-0.0.4-cp311-cp311-macosx_11_0_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

roughpy-0.0.4-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

roughpy-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

roughpy-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

roughpy-0.0.4-cp39-cp39-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.9Windows x86-64

roughpy-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

roughpy-0.0.4-cp38-cp38-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.8Windows x86-64

roughpy-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file roughpy-0.0.4.tar.gz.

File metadata

  • Download URL: roughpy-0.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for roughpy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f20b05f208f2e1e0b9537814d1e2c9fbf65f64a8d5fdedc3b33c39bb429b7ce8
MD5 550da1dfd3e1f7c3fdf1040bbcb41127
BLAKE2b-256 eab004506678c48489b36e54dc0711bf8d90bc8e14e68d719dd84c59d249f6ac

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: roughpy-0.0.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for roughpy-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8c06056b7025d735579f3ec4aa36ecd29f7507ef7d5c667524c3b8d551f943f5
MD5 327cdde8877175b03ab4adcdadbaf721
BLAKE2b-256 99e4cefb670a5cd33ba9d620c6f3b3084a6ea789aa2286875aaf11df26276498

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 413e47fdd66cba24050c0e93ea34661bf0fcde7c8d4f0b14c01012001e461baa
MD5 6c524da90912937f61bedab705390438
BLAKE2b-256 1af3a56a299f723128fc3b17bc83105daae2e2851612d8e3c11bda8901a54afd

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d78221866356220ff1c1abd10bd241fba286a7ec38fcee7c5fa0177e2c73e7b7
MD5 d8d264302419660cd77aab3609684f36
BLAKE2b-256 fd1782f7f486acd6a8a9df1488e2019833da6917e80e19e39e3e29ae22133247

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: roughpy-0.0.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for roughpy-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c10d8a9cae1dae36712bb185630ab68f2f2ad136c099b674fb025e904f6ca024
MD5 86a4d07aa74eee7b5655e1d6b0b5a8df
BLAKE2b-256 9b2f8fbb79fc9d17f72c5e38c598f8045aab7506be1d6793387fb9eb8e5daffe

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 feb73c6a36dca7022301f3915838d329cdcf6bdb23385dbef7537085789db5a0
MD5 0cd855acc41248788f83c585d3915ce8
BLAKE2b-256 78393d7c9e382daadb081e33ea15d06ae1d6e55df8098039969c1d4c20eb0f9c

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 50229e0793ade4fff5e157836e53b531a81898183484255aa2f4231d2a48a122
MD5 761e9ba62308cdc80bb12be7c55f080e
BLAKE2b-256 450b4194f7cecea140c92a8eac1abbed8f586a4e127b5ff800e0f8a7ee73f1fb

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: roughpy-0.0.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for roughpy-0.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 36e503180acb832fc9cf7246f2834937e396dff1f87ee0db4c71c5616ea6d630
MD5 5ace0336094f7b8884b390f47eb9ed92
BLAKE2b-256 ac1af2578b1bcaa3bc3ae9ad905f5d6dab4962807e54dfa2920cf21aba17f27b

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce6c82778907a9527151acd2e5d83ebeab4ba75bcd45bb7bb9b354647b67ed3f
MD5 de02bf2e1c79336d619df7b095e74090
BLAKE2b-256 37e84eb1291b6186fcb64d0ff1ac2716bb5ea16263aa251ee169544e19d53f2a

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: roughpy-0.0.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for roughpy-0.0.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6d29df8d28bbe5f15dd9989c5c4945689818551b1f5efc73c405cccc9696a337
MD5 0c427076fd01c9f5d2f1be9d9f511d72
BLAKE2b-256 367f925b8c752f47833c1d8fb8fe46e448afecd3b6bf48dcb9b39376b0322e71

See more details on using hashes here.

File details

Details for the file roughpy-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for roughpy-0.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8207435647e51cb1cd797d9b0262cfa58f54798b6a3591aaa993ce4fa38ce21
MD5 2b396ae50931034934178687231a6f44
BLAKE2b-256 7696fea74cf679c7c2644ea8e207180a8c4164d52464d7edd1468742a60c9381

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page