Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Packages
chemical_checker
Commits
001b0c2b
Commit
001b0c2b
authored
Oct 08, 2021
by
Martina Locatelli
🍁
Browse files
Preprocess save_output: fixing error in create_dataset
parent
65ff5a39
Pipeline
#2532
passed with stages
in 65 minutes and 39 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
package/chemicalchecker/core/preprocess.py
View file @
001b0c2b
...
...
@@ -354,7 +354,7 @@ class Preprocess():
raws
=
np
.
zeros
((
chunk
,
len
(
orderwords
)),
dtype
=
np
.
int8
)
index
=
0
saving_features
=
orderwords
# continuous
else
:
# get molecules inchikeys
...
...
@@ -380,12 +380,14 @@ class Preprocess():
hf
.
create_dataset
(
"features"
,
data
=
np
.
array
(
features
,
DataSignature
.
string_dtype
()))
saving_features
=
features
# if fitting, we also save the features
if
method
==
"fit"
:
fn
=
os
.
path
.
join
(
models_path
,
features_file
)
with
h5py
.
File
(
fn
,
"w"
)
as
hf
:
hf
.
create_dataset
(
"features"
,
data
=
np
.
array
(
features
,
DataSignature
.
string_dtype
()))
hf
.
create_dataset
(
"features"
,
data
=
np
.
array
(
saving_features
,
DataSignature
.
string_dtype
()))
def
to_feature_string
(
self
,
signatures
,
string_func
):
"""Covert signature to a string with feature names.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment