TensorKit

raw JSON →
0.1.0 verified Mon Apr 27 auth: no python

TensorKit is a deep learning helper bridging Python and C++. Version 0.1.0, early development stage with no stable release cadence.

pip install tk
error ModuleNotFoundError: No module named 'tk'
cause The package is not installed or the name 'tk' conflicts with tkinter.
fix
Run 'pip install tk' and ensure you are not importing tkinter as 'tk' first.
error ImportError: cannot import name 'Tensor' from 'tk'
cause The API may have changed; check the installed version.
fix
Inspect the module: dir(tk) to see available classes.
gotcha The package name 'tk' conflicts with Python's built-in 'tkinter' module (often imported as 'tk'). Be careful with namespace collisions.
fix Use an alias: import tk as tensorflow_kit
breaking TensorKit is in early alpha; API breaking changes are expected. There is no stable release.
fix Pin version strictly: tk==0.1.0 in requirements.
deprecated No known deprecations yet, but the library is very new.
fix Monitor GitHub for updates.

Create a TensorKit tensor from a numpy array.

import tk
import numpy as np

tensor = tk.Tensor(np.array([1, 2, 3]))
print(tensor)