semvec/pypi-packages huggingface dataset:
numpy-typing 1.1.1
Improved numpy typing anotations
Keywords: python, numpy, typing, type hinting


This package adds cleaner typing for numpy arrays.  It
has been designed for deep learning and data processing tasks which generally
need a lot of numpy arrays of large dimensions.


To use the library modify all your import with :
```python
from numpy_typing import np, ax
```

The modified version of numpy imported there contain sumplementary annotations in order to have smart and automatic inferred annotation.

> Remark : This import load the real Numpy library. As Numpy-Typing do not use wrapper, every Numpy functions are directly called without intermediate code. Hence Numpy-Typing is as fast as Numpy.


You can then use new annotation like:
```python
float32Array3d:np.float32_3d[ax.batch, ax.sample, ax.feature] = np.zeros((3, 3, 3))
v = float32Array3d[0, 0, 0] # v automatically inferred as float32
```
The library add new array_types annotation:
- np.float32_(***n***)d
- np.float64_(***n***)d
- np.int32_(***n***)d
- np.int64_(***n***)d
- np.int8_(***n***)d
- np.bool_(***n***)d
- np.str_(***n***)d

Where ***n*** is the number of dimension of the array. The value of ***n*** is for instance only supported between [1, 4].

Moreover, as the library dosen't support yet all the numpy types, you can also use the generic type
```np.array_(1-4)d[dtype, axis1, ...]```

Then you should specify for each dimension the role of the dimension:
- ax.batch: The axis select the nth batch
- ax.sample: The axis select the nth sample of the batch
- ax.feature: The axis contain features
- ax.time: The axis represent the time
- ax.label: the axis contain labels
- ax.x: The axis represent the x coordinate
- ax.y: The axis represent the y coordinate
- ax.z: The axis represent the z coordinate
- ax.rgb: the axis contain a rgb value [0] for red, [1] for green and [2] for blue
- ax.rgba: the axis contain a rgba value [0] for red, [1] for green, [2] for blue and [3] for alpha

Here is an example of useful smart annotation:
```python
a:np.float32_1d[ax.time] = np.zeros((64))
b:np.float32_1d[ax.time] = np.zeros((64))
c = np.concatenate([a, b])
# automatically infer the type of c as np.float32_1d[ax.time]
```

If you want the library to support more types, more numpy functions or if you have any suggestion, feel free to open an issue on our [github](https://github.com/melpiro/numpy-typing).
pydepdetective 0.1.1
A tool to automatically detect and install Python dependencies
Requires Python: >=3.7

# PyDepDetective

[![PyPI version](https://badge.fury.io/py/pydepdetective.svg)](https://badge.fury.io/py/pydepdetective)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Ever hated starting a new python project (or an existing one) and having to install dependencies one by one?

PyDepDetective is a Python tool that automatically detects and installs dependencies for a given Python file. It simplifies the process of setting up project dependencies by analyzing import statements, comments, and even references to `requirements.txt` files.

## Features

- Analyzes Python files to detect import statements
- Identifies third-party imports by filtering out standard library modules
- Detects `pip install` comments in the code
- Recognizes references to `requirements.txt` files
- Checks for already installed packages to avoid unnecessary reinstallation
- Handles common package name mismatches (e.g., `PIL` for `pillow`)
- Provides an interactive prompt to confirm installations
- Supports installation from `requirements.txt` files

## Installation

You can install PyDepDetective using pip:

```
pip install pydepdetective
```

## Usage

After installation, you can run PyDepDetective from the command line:

```
pydepdetective path/to/your/file.py
```

The tool will analyze the file and prompt you to install any detected dependencies.

## How It Works

1. PyDepDetective parses the given Python file and extracts all import statements.
2. It filters out standard library imports to identify third-party packages.
3. The file content is also analyzed for `# pip install` comments and references to `requirements.txt`.
4. The tool checks which packages are already installed in your environment.
5. You are prompted to confirm the installation of detected dependencies.
6. If confirmed, PyDepDetective uses pip to install the required packages.

## Limitations (for now)

- May not detect very complex dynamic imports or imports within deeply nested code.
- The package name mapping is limited to common cases and may need expansion for less common packages.
- Does not handle version specifications (e.g., `package>=1.0.0`).

## Contributing

Contributions to improve PyDepDetective are welcome! Please feel free to submit a Pull Request.

## License

This project is open source and available under the [MIT License](LICENSE).

## Contact

If you have any questions or feedback, please open an issue on the GitHub repository.

Happy coding!