semvec/pypi-packages huggingface dataset:
amr2h5 0.0.3
A converter from AMR Block data (BoxLib) to H5 covered grids
Requires Python: >=3.6

# AMR Block data to H5 converter

This python package can be used to convert AMR block data files to the H5 format with covered grid arrays at the maximum refinement level. 

Right now only 2D AMR files are supported, support for 3D dataset will likely be for the creation of slices as creating a 3D covered grid array would not be practical in terms of file size.

This python package relies heavily on the `yt` package to read AMR plotfiles.

## Installation

```bash
pip install amr2h5
```

## Usage

- The `AMR2H5Converter` class creates a single `.h5` file from a AMR plotfile directory. All the fields are keept and the AMR Level is added to the dataset. The `x` and `y` coordinates at the highest refinement level are added as 1D arrays. The `return_opened` option can be used to dynamically read plotfiles into 2D arrays.
- The `H5Reader` class reads all the data from a converted AMR plotfile into a dictionnary with all the fields as keys and 2D arrays for all the dataset. The `fast_field` option can be used to read a single field (faster), this is usefull when analyzing time series data for a single field.

## Example

```python
from amr2h5 import AMR2H5Converter
from amr2h5 import H5Reader

# Convert a single plotfile
AMR2H5Converter('plt02000') # New file plt02000.h5 is created

# Convert and read a single plotfile
 # New file plt02000.h5 is created and read
dataset = AMR2H5Converter('plt02000', return_opened=True)

# Read a converted file
dataset = H5Reader('plt02000.h5') # dataset is a dict with the whole dataset

# Reader a single field from file (faster)
# dataset_temp contains only coordinates and 'temp' field
dataset_temp = H5Reader('plt02000.h5', fast_field='temp')

```
patchgenerator 0.0.4
`Patchgenerator` is a simple tool to generate array indices, with or without overlap, to create numpy array patches. Only requires python.
Requires Python: >=3.7

# `patchgenerator`

The `patchgenerator` is a simple tool to generate array indices, with or without overlap, to create numpy array patches. Only requires python.

# Example usage:

```
from patch_indices.patch_indices import PatchGenerator

patch_generator = PatchGenerator(100, 80, 10, 20, y_overlap=2, x_overlap=3)
for patch in patch_generator:
    row_start, cols_start, row_end, cols_end = patch
    print("row_start, cols_start, row_end, cols_end", row_start, cols_start, row_end, cols_end)
```
```
import numpy as np
from patch_indices.patch_indices import PatchGenerator

np_array = np.ones((100, 80, 3), dtype=np.uint8)
y_size, x_size, z_size = np_array.shape
patch_size_y = 10
patch_size_x = 20

patch_generator = PatchGenerator(y_size, x_size, patch_size_y, patch_size_x, y_overlap=2, x_overlap=3)
for patch in patch_generator:
    row_start, cols_start, row_end, cols_end = patch
    print("row_start, cols_start, row_end, cols_end", row_start, cols_start, row_end, cols_end)
    print(np_array[row_start:row_start + row_end, cols_start:cols_start + cols_end, :].shape)
```
prettyqt 1.57.2
A pythonic layer on top of PyQt6 / PySide6
Requires Python: >=3.10,<4.0

# prettyqt: Pythonic layer on top of PyQt6 / PySide6
[![PyPI Latest Release](https://img.shields.io/pypi/v/prettyqt.svg)](https://pypi.org/project/prettyqt/)
[![Package Status](https://img.shields.io/pypi/status/prettyqt.svg)](https://pypi.org/project/prettyqt/)
[![License](https://img.shields.io/pypi/l/prettyqt.svg)](https://github.com/phil65/PrettyQt/blob/master/LICENSE)
[![CodeCov](https://codecov.io/gh/phil65/PrettyQt/branch/master/graph/badge.svg)](https://codecov.io/gh/phil65/PrettyQt)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyUp](https://pyup.io/repos/github/phil65/PrettyQt/shield.svg)](https://pyup.io/repos/github/phil65/PrettyQt/)

## What is it?

**PrettyQt** is a Python package that provides a pythonic layer on top of the GUI frameworks PyQt6 / PySide6.

## Documentation
The official documentation is hosted on Github Pages: https://phil65.github.io/PrettyQt/

## Main Features
  - Subclasses for almost all Qt classes, enriched with helper and __dunder__ methods to give a feel of a native GUI library.
  - more than 80 pre-defined widgets and layouts for common use cases
  - more than 30 ItemModels for different data types
  - more than 25 general-purpose proxy models
  - 10 ItemDelegates for different purposes
  - 20 different Validators
  - much, much more.

## Where to get it
The source code is currently hosted on GitHub at:
https://github.com/phil65/PrettyQt

The latest released version are available at the [Python
package index](https://pypi.org/project/prettyqt).

```sh
# or PyPI
pip install prettyqt
```