Skip to content

Commit

Permalink
🗑️ Remove shapely.speedups (#622)
Browse files Browse the repository at this point in the history
- Remove `shapely.speedups`.
- [The shapely.speedups module (the enable and disable functions) is deprecated and will be removed in the future. The module no longer has any affect in Shapely >=2.0.](https://shapely.readthedocs.io/en/stable/release/2.x.html#shapely-2-0-api-changes-deprecated-in-1-8)

Co-authored-by: Mark Eastwood <20169086+measty@users.noreply.github.com>
  • Loading branch information
shaneahmed and measty authored Jun 23, 2023
1 parent 7e05548 commit 7369d8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 1 addition & 4 deletions tiatoolbox/annotation/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

import numpy as np
import pandas as pd
from shapely import speedups, wkb, wkt
from shapely import wkb, wkt
from shapely.affinity import scale, translate
from shapely.geometry import LineString, Point, Polygon
from shapely.geometry import mapping as geometry2feature
Expand All @@ -76,9 +76,6 @@

sqlite3.enable_callback_tracebacks(True)

if speedups.available: # pragma: no branch
speedups.enable()

Geometry = Union[Point, Polygon, LineString]
Properties = Dict[str, Union[Dict, List, Number, str]]
BBox = Tuple[Number, Number, Number, Number]
Expand Down
4 changes: 0 additions & 4 deletions tiatoolbox/utils/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
from matplotlib import colormaps
from numpy.typing import ArrayLike
from PIL import Image, ImageFilter, ImageOps
from shapely import speedups
from shapely.geometry import Polygon

from tiatoolbox import logger
from tiatoolbox.annotation.storage import Annotation, AnnotationStore

if speedups.available: # pragma: no branch
speedups.enable()


def random_colors(num_colors, bright=True):
"""Generate a number of random colors.
Expand Down

0 comments on commit 7369d8d

Please sign in to comment.