vectorphile
The unified ML/DL Python library. One package that replaces PyTorch + scikit-learn + NumPy + Pandas + SciPy.
import vectorphile as vp
What's inside
| Module | Replaces | What you get |
|---|---|---|
vp (core) |
NumPy | Tensor, all ndarray ops, autograd |
vp.nn |
PyTorch nn |
Layers, activations, losses, Sequential |
vp.optim |
PyTorch optim |
SGD, Adam, AdamW, RMSprop, Adagrad, LR schedulers |
vp.autograd |
PyTorch autograd | Reverse-mode autodiff, no_grad |
vp.ml |
scikit-learn | Linear models, trees, forests, boosting, clustering, decomposition, neighbors, Naive Bayes, SVM, preprocessing, metrics, model selection |
vp.ml.boost |
XGBoost | XGBClassifier, XGBRegressor |
vp.data |
Pandas | DataFrame, Series, read_csv, read_json, GroupBy, merge, pivot, melt |
vp.linalg |
NumPy linalg | det, inv, svd, eig, lstsq, solve, norm, qr, cholesky, pinv |
vp.stats |
SciPy stats | mean, std, corr, cov, zscore, t-test, chi2, ANOVA, Pearson/Spearman |
vp.random |
NumPy random | seed, rand, randn, choice, normal, binomial, multinomial |
vp.fft |
NumPy fft | fft, ifft, rfft, fft2, fftshift |
vp.signal |
SciPy signal | stft, convolve, correlate, butter, filtfilt, spectrogram |
vp.sparse |
SciPy sparse | csr_matrix, csc_matrix, coo_matrix |
vp.optimize |
SciPy optimize | minimize, root, curve_fit, differential_evolution |
vp.amp |
PyTorch amp | autocast, GradScaler (Phase 2: real CUDA fp16) |
vp.utils.data |
PyTorch DataLoader | Dataset, TensorDataset, DataLoader |
Quick start
Tensors
import vectorphile as vp
x = vp.randn(3, 4)
y = vp.ones(4, 5)
z = x @ y # (3, 5)
t = vp.tensor([1, 2, 3], dtype='float32')
t2 = t.reshape(1, 3).T # (3, 1)
Neural networks
model = vp.nn.Sequential(
vp.nn.Linear(784, 256),
vp.nn.BatchNorm1d(256),
vp.nn.GELU(),
vp.nn.Dropout(0.3),
vp.nn.Linear(256, 10),
)
optimizer = vp.optim.AdamW(model.parameters(), lr=1e-3)
scheduler = vp.optim.CosineAnnealingLR(optimizer, T_max=100)
criterion = vp.nn.CrossEntropyLoss()
for epoch in range(100):
optimizer.zero_grad()
logits = model(X_train)
loss = criterion(logits, y_train)
loss.backward()
optimizer.step()
scheduler.step()
Classical ML
from vectorphile import ml
# Split
X_train, X_test, y_train, y_test = ml.train_test_split(X, y, test_size=0.2)
# Preprocess
scaler = ml.StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
# Train
clf = ml.RandomForestClassifier(n_estimators=100)
clf.fit(X_train, y_train)
print(f"Accuracy: {ml.accuracy_score(y_test, clf.predict(X_test)):.4f}")
# Dimensionality reduction
pca = ml.PCA(n_components=2)
X_2d = pca.fit_transform(X)
DataFrames
df = vp.read_csv('data.csv')
# Filter, transform
senior = df[df['years_exp'] > 5]
df['bonus'] = df['salary'] * 0.1
# GroupBy
dept_avg = df.groupby('dept').mean()
# Merge
df2 = df.merge(reviews, on='employee_id', how='left')
# Stats
df.describe()
df[['salary', 'score']].corr()
Autograd
x = vp.tensor([2.0, 3.0], requires_grad=True)
y = (x ** 2 + 3 * x).sum()
y.backward()
print(x.grad) # [2*x+3] = [7, 9]
with vp.no_grad():
pred = model(X_test) # no gradient tracking
Installation
# From source
pip install -e .
# With optional dependencies
pip install -e ".[full]" # adds scipy, pyarrow
pip install -e ".[dev]" # adds pytest
Requirements: Python >= 3.9, NumPy >= 1.24
Architecture
vectorphile/
├── core/ ← Tensor class, all tensor ops
├── autograd/ ← Reverse-mode autodiff engine
├── nn/ ← Layers, activations, losses, Sequential
├── optim/ ← Optimizers + LR schedulers
├── ml/ ← Classical ML (sklearn-compatible API)
│ └── boost/ ← XGBoost-style gradient boosting
├── data/ ← DataFrame, Series, GroupBy (pandas-compatible)
├── linalg/ ← Linear algebra
├── stats/ ← Statistical functions
├── random/ ← Random number generation
├── fft/ ← FFT operations
├── signal/ ← Digital signal processing
├── sparse/ ← Sparse matrices
├── optimize/ ← Numerical optimization
├── amp/ ← Automatic mixed precision (Phase 2)
└── utils/
└── data/ ← Dataset, TensorDataset, DataLoader
Phase 1 (current): Pure Python + NumPy backend. Phase 2 (roadmap): C extensions for core ops, real CUDA support via cuBLAS/cuDNN, fp16/bf16 AMP.
Running tests
pytest tests/ -v
License
Apache-2.0
Metadata
Release files for vectorphile 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 | Provenance | Actions |
|---|---|---|---|---|
| vectorphile-0.1.0.tar.gz | 59.8 kB | With provenance | Details for vectorphile-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vectorphile-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for vectorphile-0.1.0-py3-none-any.whl |
Total release size: 127.1 kB
Release files / vectorphile-0.1.0.tar.gz
| Download URL | vectorphile-0.1.0.tar.gz |
|---|---|
| Size | 59.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7234e491b2a6ea77b1cfdd58db1408b3904ac47ef13ded9909ea43d48d6cf310
|
|
BLAKE2b-256 checksum How to use checksums |
c482a513672965d261bfbf45b9150be2a69f15eb10192d204ae9a2e398c21b6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / vectorphile-0.1.0-py3-none-any.whl
| Download URL | vectorphile-0.1.0-py3-none-any.whl |
|---|---|
| Size | 67.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6205b1683e76da82f842c56dc2a57d9ba4570c4189624f895e1b3158f30d56ce
|
|
BLAKE2b-256 checksum How to use checksums |
9a17613506b2227e1d4ae11a53cf9e848138fcee88b7c27f0d13915a2cc599a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for vectorphile 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vectorphile-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.