FXTensor
マルコフ・テンソルを計算するモジュールです。
インストール
pip install fxtensor-salmon
使い方
JSON定義からFXTensorオブジェクトを作成する方法は以下の通りです。
import numpy as np
from fxtensor import FXTensor
json_data = {
"profile": [[2], [2]],
"strands": [
{"from": [0], "to": [0], "weight": 0.3},
{"from": [0], "to": [1], "weight": 0.7},
{"from": [1], "to": [0], "weight": 0.5},
{"from": [1], "to": [1], "weight": 0.5}
]
}
# JSONデータからテンソルを作成
stochastic_map = FXTensor.from_json(json_data)
print(stochastic_map)
# 出力予測: FXTensor(profile=[[2], [2]], shape=(2, 2))
print(stochastic_map.data)
# 出力予測:
# [[0.3 0.7]
# [0.5 0.5]]
Metadata
Release files for fxtensor_salmon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fxtensor_salmon-0.1.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fxtensor_salmon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / fxtensor_salmon-0.1.0.tar.gz
| Download URL | fxtensor_salmon-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
709246caada1d00ad17c9c80465bce73219728a4d4fe7e8ad41f9082fd58c526
|
|
BLAKE2b-256 checksum How to use checksums |
be2359820366c37fc5feb85f3b268e8765a507c0a41cb48f0b6a42c8e8efca55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / fxtensor_salmon-0.1.0-py3-none-any.whl
| Download URL | fxtensor_salmon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb5e7296296a48feacb29890e73d560c405b4b36cda8308ecef34ae8d7054905
|
|
BLAKE2b-256 checksum How to use checksums |
7bdf427788d29fe243bb5438cd026e474f169fb5518e54ffd2bed652d1c135a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|