Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Aug 3, 2020
2 parents fc84737 + a4afabe commit 53d79d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ Most recent releases are shown at the top. Each release shows:
- **Changed**: Additional parameters, changes to inputs or outputs, etc
- **Fixed**: Bug fixes that don't change documented behaviour

## 0.19.2 (2020-08-03)

### New:
- N/A

### Changed
- N/A

### Fixed:
- added missing `num_classes` argument to `to_categorical`


## 0.19.1 (2020-07-29)

### New:
Expand Down
4 changes: 1 addition & 3 deletions ktrain/text/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,8 @@ def _transform_y(self, y_data, verbose=1):

# if shape is 1, this is either a classification or regression task
# depending on class_names existing
y_data = to_categorical(y_data) if len(y_data.shape) == 1 and self.get_classes() else y_data
y_data = to_categorical(y_data, num_classes=len(self.get_classes())) if len(y_data.shape) == 1 and self.get_classes() else y_data
if self.get_classes():
x = y_data.shape[1]
y = len(self.get_classes())
if train and y_data.shape[1] != len(self.get_classes()):
raise Exception('Class labels in training set are %s, but y_data has %s classes' % (self.get_classes(), y_data.shape[1]))
return y_data
Expand Down
2 changes: 1 addition & 1 deletion ktrain/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__all__ = ['__version__']
__version__ = '0.19.1'
__version__ = '0.19.2'

0 comments on commit 53d79d9

Please sign in to comment.