How to use the ck.kernel.restore_flattened_dict function in ck

To help you get started, we’ve selected a few ck examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ctuning / ck / tests / flatten_dict.py View on Github external
a={'dyn_features':{'ft1':'1', 'ft2':'2'}, 'static_features':{'ft3':'3','ft4':'4'}}

print ('Original array:')
print (a)

r=ck.flatten_dict({'dict':a})
if r['return']>0: 
   print ('Error:'+r['error'])
   sys.exit(1)

x=r['dict']
print ('')
print ('Flattened array:')
print (x)

r=ck.restore_flattened_dict({'dict':x})
print ('')
print ('Restored array:')
print (r['dict'])


                             
sys.exit(0)

ck

Collective Knowledge - a lightweight knowledge manager to organize, cross-link, share and reuse artifacts and workflows based on FAIR principles

Apache-2.0
Latest version published 4 months ago

Package Health Score

78 / 100
Full package analysis

Similar packages