mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 14:43:08 +02:00
feat: split poli not nemeth
This commit is contained in:
parent
c847f006c2
commit
9d49ea894f
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -2,5 +2,5 @@ code/poli3.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/nemeth12.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/spd_5000.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/spd_10000.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/nemeth12_1.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/nemeth12_2.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/poli3_1.npz filter=lfs diff=lfs merge=lfs -text
|
||||
code/poli3_2.npz filter=lfs diff=lfs merge=lfs -text
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80e15c0c8668a0edd86a7b76067885c2dd4872d436c47752d334522e468be526
|
||||
size 722988846
|
||||
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:07b828133018898a6bcc3d1983c142a9aaf5f9955d1ccf00dc9fb502d366ec96
|
||||
size 542
|
||||
@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
# Load the .npz file
|
||||
input_file = 'code/nemeth12.npz'
|
||||
input_file = 'code/poli3.npz'
|
||||
data = np.load(input_file)
|
||||
|
||||
# Create dictionaries to hold the split data
|
||||
@ -11,7 +11,7 @@ first_half = {key: data[key] for key in data_keys[:split_point]}
|
||||
second_half = {key: data[key] for key in data_keys[split_point:]}
|
||||
|
||||
# Save the halves to separate .npz files
|
||||
np.savez('nemeth12_1.npz', **first_half)
|
||||
np.savez('nemeth12_2.npz', **second_half)
|
||||
np.savez('poli3_1.npz', **first_half)
|
||||
np.savez('poli3_2.npz', **second_half)
|
||||
|
||||
print(f"Data split into 'nemeth12_1.npz' and 'nemeth12_2.npz'")
|
||||
print(f"Data split into 'poli3_1.npz' and 'poli3_2.npz'")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user