Gridkit

Latest version: v0.10.0

Safety actively analyzes 624845 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

0.10.0

Features
- Add GridIndex.sort()
- Allow plotting of RGB(A) values in doc_utils.plot_polygons
- Improve performance of doc_utils.plot_polygons
- Improve performance of initializing a new GridIndex if the supplied indices are already in an appropriate numpy integer ndarray.

Fixes
- Fix incorrect HexGrid.relative_neighbours and by extension BaseGrid.neighbours for HexGrid when supplying multiple grid indices at a time

Documentation
- Add example 2d_diff_hex_anim.py

0.9.2

---------------------------------------
Features
- Add new initialization argument ``area`` to `TriGrid`, `RectGrid` and `HexGrid` for specifying the cell area of the grid
- Add new property `BaseGrid.area`
- Add ``shape`` to `RectGrid` to further unify the class API between the three grid types

Fixes
- Prevent passing rotation argument to Bounded grids, which were not designed with rotation in mind because that breaks the tiling.

Documentation
- Update example `resampling.py`
- Improve docstrings about initialization of `TriGrid`, `RectGrid` and `HexGrid`

0.9.1

Features
- Change the following attributes using a setter: ``rotation``, ``offset`` and (``size`` TriGrid and HexGrid) or (``dx`` and ``dy`` for RectGrid)
- Add ``BaseGrid.cell_height`` and ``BaseGrid.cell_width``
- Add ``BaseGrid.update`` method for easily making small changes to grid specs

Fixes
- ``offset`` is now properly taken into account for ``HexGrid.cell_at_point``
- Less restrictive offsets by limiting offset for all grids with ``BaseGrid.cell_height`` and ``BaseGrid.cell_width`` instead of dx and dy.
- Rotation of "flat" ``HexGrids`` is no longer in the opposite direction (was clockwise)

Documentation
- Add example rotation_animation.py

0.9.0

Features
- Rotation for `TriGrid`, `RectGrid` and `HexGrid`
- Note: not for the bounded versions

Fixes:
- Fixed `RectGrid.cells_near_point` returning incorrect cells for negative points

Documentation
- Add example `rotated_grids.py`

0.8.0

Fixes
- Return `GridIndex` from `HexGrid.cells_near_point`
- Align return shape of index `RectGrid.cells_near_point` with those of `TriGrid.cells_near_point` and `HexGrid.cells_near_point` (!API change)
- Allow multi-dimensional input and returns form method `cells_near_point` on the three grid types

Misc
- Move the following methods to Rust:

- `RectGrid.cells_near_point`
- `HexGrid.cells_near_point`

0.7.3

Fixes
- Properly handle negative offsets in Rust grid classes

Misc
- Move the following methods to Rust:

- RectGrid.centroid
- RectGrid.cell_at_point
- RectGrid.cell_corners
- HexGrid.centroid
- HexGrid.cell_at_point
- HexGrid.cell_corners

This is done in preparation of rotation of un-bounded grids and provides a minor speedup.

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.