Skip to content

Commit ba0deb8

Browse files
committed
Remove deprecated function
1 parent 8e36766 commit ba0deb8

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

spectral/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
from .config import SpySettings, spy_colors
2121
settings = SpySettings()
2222

23-
from .spectral import (open_image, load_training_sets, save_training_sets,
24-
BandInfo)
23+
from .spectral import (open_image, load_training_sets, BandInfo)
2524
from .io import *
2625
from .algorithms import *
2726
from .graphics import *

spectral/spectral.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -119,25 +119,6 @@ def open_image(file):
119119
raise IOError('Unable to determine file type or type not supported.')
120120

121121

122-
123-
def save_training_sets(sets, file):
124-
'''
125-
Saves a list of TrainingSet objects to a file. This function assumes
126-
that all the sets in the list refer to the same image and mask array.
127-
If that is not the case, this function should not be used.
128-
'''
129-
f = open(file, 'w')
130-
z = array.array([])
131-
132-
pickle.dump(len(sets), f)
133-
DumpArray(sets[0].mask, f)
134-
for s in sets:
135-
s.mask = z
136-
s.dump(f)
137-
138-
f.close()
139-
140-
141122
def load_training_sets(file, image=None):
142123
'''
143124
Loads a list of TrainingSet objects from a file. This function assumes

0 commit comments

Comments
 (0)