File: python3-import

package info (click to toggle)
keras-preprocessing 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 400 kB
  • sloc: python: 4,161; makefile: 11; sh: 10
file content (18 lines) | stat: -rwxr-xr-x 446 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

# python3.Y at build time, python3 at CI time
PYINTERPRETER=${PYINTERPRETER:-python3}

# Python module successfully imported
${PYINTERPRETER} -c 'import keras_preprocessing'

# Exercise one function of the library
${PYINTERPRETER} -c 'import numpy as np
from keras_preprocessing import text
encoded = text.one_hot("The cat sat on the mat.", 5)
assert len(encoded) == 6
assert np.max(encoded) <= 4
assert np.min(encoded) >= 1
'