Skip to content

Commit 54690b7

Browse files
committed
- minor simplifications and assertions added to FeatureEncoder
- version bump in build and publish script - docs rebuild
1 parent a9af093 commit 54690b7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/.doctrees/environment.pickle

0 Bytes
Binary file not shown.

improveai/feature_encoder.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ def _check_into(self, into: np.ndarray):
120120
121121
"""
122122

123+
if into is not None:
124+
assert len(self.feature_indexes) == len(into)
125+
123126
if not isinstance(into, np.ndarray) or into.dtype != np.float64:
124127
raise ValueError("into must be a float64 array")
125128

@@ -471,7 +474,8 @@ def scale(val: float, width: float = 2) -> float:
471474
"""
472475
assert width >= 0
473476
# map value in [0, 1] to [-width/2, width/2]
474-
return val * width - 0.5 * width
477+
# return val * width - 0.5 * width
478+
return width * (val - 0.5)
475479

476480

477481
def get_mask(string_table: list) -> int:

package_build_tools/build_and_publish_sdist_to_pypi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
PYPI_PACKAGE_NAME=${1:-'improveai'}
3-
MAJOR_VERSION=${2:-'7.2'}
4-
MINOR_VERSION=${3:-'2'}
3+
MAJOR_VERSION=${2:-'8.0'}
4+
MINOR_VERSION=${3:-'0'}
55

66
echo "Building ${PYPI_PACKAGE_NAME} -> version ${MAJOR_VERSION}.${MINOR_VERSION}"
77
# cleanup previous build

0 commit comments

Comments
 (0)