Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Feb 19, 2020
1 parent 6f3fec2 commit dc5e700
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fastai/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def series2cat(df:DataFrame, *col_names):
class ItemBase():
"Base item type in the fastai library."
def __init__(self, data:Any): self.data=self.obj=data
def __repr__(self)->str: return f'{self.__class__.__name__} {str(self)}'
def __repr__(self)->str: return f'{self.__class__.__name__} {str(self.data)}'
def show(self, ax:plt.Axes, **kwargs):
"Subclass this method if you want to customize the way this `ItemBase` is shown on `ax`."
ax.set_title(str(self))
Expand All @@ -192,7 +192,7 @@ def __eq__(self, other): return recurse_eq(self.data, other.data)
def recurse_eq(arr1, arr2):
if is_listy(arr1): return is_listy(arr2) and len(arr1) == len(arr2) and np.all([recurse_eq(x,y) for x,y in zip(arr1,arr2)])
else: return np.all(np.atleast_1d(arr1 == arr2))

def download_url(url:str, dest:str, overwrite:bool=False, pbar:ProgressBar=None,
show_progress=True, chunk_size=1024*1024, timeout=4, retries=5)->None:
"Download `url` to `dest` unless it exists and not `overwrite`."
Expand Down

0 comments on commit dc5e700

Please sign in to comment.