Tensora

Latest version: v0.3.0

Safety actively analyzes 623608 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

This release splits out the TACO binary into a separate package `tensora-taco`. This package is optional, making the TACO code generator optional. The native Tensora code generator is still included and used by default. TACO can be still be used as an alternative code generator if the `tensora[taco]` extra is installed.

Also, these other changes:

- The signature of `tensor_method` was changed so that the `output_format ` and `input_formats` were combined into one `formats` dictionary
- Renamed `PureTensorMethod` to `TensorMethod` to reflect the decision that mutable assignments will never be supported in Tensora
- Most of the attributes on `TensorMethod` were made private
- Cache on a parsed `Problem`, instead of on the string versions of assignments and formats
- Raise a nice exception on `TensorMethod` when trying to broadcast to target indexes because there is no way for the dimensions of those indexes to be known. Generating such kernels via the `tensora` CLI is still permitted.
- Raise a nice exception when a tensor and and index have the same name in an assignment
- Remove `Tensor.from_scalar`; you could always use `Tensora.from_lol`
- Do not cast the result of a vector inner product `a b` to a Python scalar; leave it as a scalar `Tensor`

0.2.0

This release removes a lot of partially implemented features, making the remaining behavior more reliable.

- Scalars are no longer supported. Users must use `x()` instead of `x` in all expressions.
- Added option to `tensora` CLI to allow choosing the external TACO binary as the code generator
- Better exceptions are raised for many kinds of invalid input
- Appended an underscore in front of many Python files to make is explicit that they are not part of the external API

0.1.1

This is a quick release to fix some issues in the previous release.

- Raise a nice exception when no solution is found by the tensor algebra compiler
- Rename `assemble` to `assemble` everywhere so that the tense is consistent with `compute` and `evaluate`
- Fix bug where compute code was being emitted when assemble code was requested

0.1.0

This release includes two major changes:

- A new tensor algebra compiler written in Python specifically for Tensora
- Added `tensora.TensorCompiler` enum with values `TensorCompiler.tensora` and `TensorCompiler.taco`
- `tensor_method` accepts an optional argument `compiler: TensorCompiler` that selects the tensor algebra compiler; `tensora` is the default
- Split `evaluate` into `evaluate_tensora` and `evaluate_taco` to select the tensor algebra compiler; `evaluate` is an alias for `evaluate_tensora`
- A `tensora` CLI that will emit the code for given tensor algebra problems

And one minor change:

- Dropped support for Python 3.8 and 3.9 (allows for the `match` statement, which was helpful in writing the new tensora algebra compiler)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.