plum
jaxtyping
plum | jaxtyping | |
---|---|---|
6 | 8 | |
539 | 1,235 | |
1.1% | 5.8% | |
8.6 | 8.3 | |
7 days ago | 13 days ago | |
Python | Python | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
plum
- Plum: Multiple Dispatch in Python
-
Writing Python like it’s Rust
You can use https://github.com/beartype/plum instead of that elif chain too
- GitHub - wesselb/plum: Multiple dispatch in Python
- Plum-dispatch: Julia-inspired multiple dispatch in Python
- Is there any language that is as similar as possible to Python in syntax, readability, and features, but is statically typed?
-
How Julia Uses Multiple Dispatch to Beat Python
Singledispatch is old, dates back to py2: https://docs.python.org/3/library/functools.html#functools.s...
I definitely agree that multiple dispatch is a lot harder :). But most of the examples in the article didn't need it, and it would have been appropriate I think to show equivalent code in Python. All that article did was make me think the author didn't know Python very well.
There are several libraries for multiple dispatch too, for e.g. https://github.com/wesselb/plum
jaxtyping
-
Python type hints may not be not for me in practice
You want runtime typechecking.
See either beartype [1] or typeguard [2]. And if you're doing any kind of array-based programming (JAX or not), then jaxtyping [3].
[1] https://github.com/beartype/beartype/
[2] https://github.com/agronholm/typeguard
[3] https://github.com/patrick-kidger/jaxtyping
-
Writing Python like it's Rust
Try using [jaxtyping](https://github.com/google/jaxtyping).
It also supports numpy/pytorch/etc.
-
Writing Python like it’s Rust
Since you mention ML use-cases, you might like jaxtyping.
-
Scientific computing in JAX
jaxtyping: rich shape & dtype annotations for arrays and tensors (also supports PyTorch/TensorFlow/NumPy);
-
[D] Have their been any attempts to create a programming language specifically for machine learning?
Heads-up that my newer jaxtyping project now exists.
-
Returning to snake's nest after a long journey, any major advances in python for science ?
As other folks have commented, type hints are now a big deal. For static typing the best checker is pyright. For runtime checking there is typeguard and beartype. These can be integrated with array libraries through jaxtyping. (Which also works for PyTorch/numpy/etc., despite the name.)
- Type annotations and runtime checking for shape and dtype
What are some alternatives?
multipledispatch - Multiple dispatch
torchtyping - Type annotations and dynamic checking for a tensor's shape, dtype, names, etc.
MonkeyType - A Python library that generates static type annotations by collecting runtime types
diffrax - Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. https://docs.kidger.site/diffrax/
Pomander - Deploy your PHP with PHP. Inspired by Capistrano and Vlad.
madtypes - Python Type that raise TypeError at runtime
runtype - Utilities for run-time type validation and multiple dispatch
MindsDB - Platform for building AI that can learn and answer questions over federated data.
dynamic-dns - An automated dynamic DNS solution for Docker and DigitalOcean
tiny-cuda-nn - Lightning fast C++/CUDA neural network framework
Envoy - Elegant SSH tasks for PHP.
pytype - A static type analyzer for Python code