Skip to content

Commit 9fa271a

Browse files
author
Matt Sokoloff
committed
numpy bug fix
1 parent e88702e commit 9fa271a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2+
# Version 3.11.1 (2022-01-10)
3+
## Fix
4+
* Make `TypedArray` class compatible with `numpy` versions `>= 1.22.0`
25

36
# Version 3.11.0 (2021-12-15)
47

labelbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "labelbox"
2-
__version__ = "3.11.0"
2+
__version__ = "3.11.1"
33

44
from labelbox.schema.project import Project
55
from labelbox.client import Client

labelbox/data/annotation_types/types.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sys
2-
import logging
32
from typing import Generic, TypeVar
43
from typing_extensions import Annotated
54

@@ -8,13 +7,13 @@
87
import numpy as np
98

109
Cuid = Annotated[str, Field(min_length=25, max_length=25)]
11-
1210
DType = TypeVar('DType')
1311

14-
logger = logging.getLogger(__name__)
1512

13+
class TypedArray(Generic[DType]):
1614

17-
class TypedArray(np.ndarray, Generic[DType]):
15+
def __new__(cls, *args, **kwargs):
16+
return np.ndarray(*args, **kwargs)
1817

1918
@classmethod
2019
def __get_validators__(cls):

0 commit comments

Comments
 (0)