Skip to content
Snippets Groups Projects
Commit 5902dbc9 authored by bbauvin's avatar bbauvin
Browse files

Added mutliple temp files possible

parent 84f7e8e8
No related branches found
No related tags found
No related merge requests found
......@@ -111,10 +111,24 @@ def transformData(dataArray):
binaryAttributes = LazyBaptisteRuleList(featureSequence, featureIndexByRule)
packedData = _pack_binary_bytes_to_ints(dataArray, 64)
del dataArray
dsetFile = h5py.File("temp_scm", "w")
nameb = "temp_scm"
try:
dsetFile = h5py.File(nameb, "w")
name=nameb
except:
fail=True
i=0
while fail:
try:
name = nameb+str(i)
dsetFile = h5py.File(name, "w")
fail=False
except:
i+=1
packedDataset = dsetFile.create_dataset("temp_scm", data=packedData)
dsetFile.close()
dsetFile = h5py.File("temp_scm", "r")
dsetFile = h5py.File(name, "r")
packedDataset = dsetFile.get("temp_scm")
attributeClassification = BaptisteRuleClassifications(packedDataset, nbExamples)
return attributeClassification, binaryAttributes, dsetFile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment