Skip to content
Snippets Groups Projects
Commit 3c1ffee8 authored by Luc Giffon's avatar Luc Giffon
Browse files

remove of the matplotlib import

parent ba51cbdd
No related branches found
No related tags found
No related merge requests found
...@@ -16,9 +16,9 @@ setup( ...@@ -16,9 +16,9 @@ setup(
name='scikit-luc', name='scikit-luc',
# You can specify all the packages manually or use the find_package # You can specify all the packages manually or use the find_package
# function # function
# packages=find_packages(exclude=['doc', 'examples']), packages=find_packages(exclude=['doc', 'examples']),
# See PEP440 for defining a proper version number # See PEP440 for defining a proper version number
version='1.02', version='1.6',
# Small description of the package # Small description of the package
description='Science-Kit developed by Luc Giffon for Luc Giffon during his PhD thesis.', description='Science-Kit developed by Luc Giffon for Luc Giffon during his PhD thesis.',
# Long description # Long description
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
This package contains some usefull functions for the PhD of Luc Giffon. This package contains some usefull functions for the PhD of Luc Giffon.
""" """
__version__ = "1.02" __version__ = "1.6"
\ No newline at end of file \ No newline at end of file
...@@ -13,7 +13,6 @@ import logging ...@@ -13,7 +13,6 @@ import logging
import tarfile import tarfile
import pickle import pickle
# --- installed packages # --- installed packages
import matplotlib.pyplot as plt
import daiquiri import daiquiri
import numpy as np import numpy as np
...@@ -97,8 +96,6 @@ class Dataset: ...@@ -97,8 +96,6 @@ class Dataset:
:return: None :return: None
""" """
# the download method shouldn't be called if the target directory tree doesn't exist.
assert os.path.exists(self.s_download_dir)
self.create_directory_tree() self.create_directory_tree()
if not check_files(self.l_filepaths): if not check_files(self.l_filepaths):
logger.info("Files need to be downloaded") logger.info("Files need to be downloaded")
...@@ -166,7 +163,7 @@ class MnistDataset(Dataset): ...@@ -166,7 +163,7 @@ class MnistDataset(Dataset):
with gzip.open(fname_img, 'rb') as fimg: with gzip.open(fname_img, 'rb') as fimg:
magic, num, rows, cols = struct.unpack(">IIII", fimg.read(16)) magic, num, rows, cols = struct.unpack(">IIII", fimg.read(16))
img = np.fromstring(fimg.read(), dtype=np.uint8) img = np.fromstring(fimg.read(), dtype=np.uint8)
img = img.reshape(len(lbl), rows, cols) img = img.reshape(len(lbl), -1)
return img, lbl return img, lbl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment