Skip to content

Commit fe2bd3c

Browse files
Update numpy and pandas to >2.0 in ml-wrappers (#180)
1 parent 738396f commit fe2bd3c

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

python/docs/dependencies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ python/ml_wrappers.egg-info/requires.txt
3333
----------------------------------------
3434

3535
- numpy
36-
- pandas<2.0.0
36+
- pandas
3737
- scipy
3838
- scikit-learn
3939

python/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
]
3737

3838
DEPENDENCIES = [
39-
'numpy<2.0.0',
39+
'numpy',
4040
'packaging',
41-
'pandas<2.0.0',
41+
'pandas',
4242
'scipy',
4343
'scikit-learn'
4444
]

tests/common_vision_utils.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,12 @@ def load_fridge_dataset():
9595
retrieve_unzip_file(download_url + download_url_end, data_file)
9696

9797
# get all file names into a pandas dataframe with the labels
98-
data = pd.DataFrame(columns=[IMAGE,
99-
LABEL])
98+
rows = []
10099
for folder in os.listdir("./data/fridgeObjects"):
101100
for file in os.listdir("./data/fridgeObjects/" + folder):
102101
image_path = "./data/fridgeObjects/" + folder + "/" + file
103-
data = data.append({IMAGE: image_path,
104-
LABEL: folder},
105-
ignore_index=True)
106-
return data
102+
rows.append({IMAGE: image_path, LABEL: folder})
103+
return pd.DataFrame(rows, columns=[IMAGE, LABEL])
107104

108105

109106
def load_multilabel_fridge_dataset():
@@ -410,9 +407,9 @@ def load_object_fridge_dataset():
410407
labels = load_object_fridge_dataset_labels()
411408

412409
# get all file names into a pandas dataframe with the labels
413-
data = pd.DataFrame(columns=["image", "label"])
410+
rows = []
414411
for i, file in enumerate(os.listdir("./data/odFridgeObjects/" + "images")):
415412
image_path = "./data/odFridgeObjects/" + "images" + "/" + file
416-
data = data.append({"image": image_path,
417-
"label": labels[i]}, ignore_index=True)
413+
rows.append({IMAGE: image_path, LABEL: labels[i]})
414+
data = pd.DataFrame(rows, columns=[IMAGE, LABEL])
418415
return data

0 commit comments

Comments
 (0)