Skip to content

Commit

Permalink
Remove pandas import.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzam committed Apr 18, 2023
1 parent f2ad650 commit de8aa84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions waveprop/dataset_util.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import pandas as pd
from torch.utils.data import Dataset
from torchvision import transforms, datasets
import torch.nn.functional as F
from PIL import Image
import os
import numpy as np
import glob
from waveprop.devices import sensor_dict
from waveprop.simulation import FarFieldSimulator
from abc import abstractmethod

Expand Down Expand Up @@ -336,7 +334,11 @@ def __init__(
"""

self.root_dir = root_dir
self.df = pd.read_csv(captions_file)
try:
import pandas as pd
self.df = pd.read_csv(captions_file)
except ImportError:
raise ImportError("Please install pandas to use this dataset")
self.device = device

transform_list = []
Expand Down

0 comments on commit de8aa84

Please sign in to comment.