This would add tagged data types (and no-copy constructors) for the concrete types represented by a spaces.
This would allow users to perform important akro operations without needing an explicit reference to the space (and saves a lot of type checking). It would also get rid of a lot of helper/misc functions.
This idea is best illustrated by an example:
import akro
dspace = akro.Dict({'foo': akro.Discrete(3)})
d = {'foo': 1} # a regular old dict
d_tagged = akro.tag(d, dspace) # returns an akro.dict (inherits from dict) which stores dspace
d_flat = d_tagged.flatten() # now I can flatten without any args
d_flat.to_tf_placeholder() # sure, why not?
e = dspace.sample() # returns an akro.dict by default)
This would add tagged data types (and no-copy constructors) for the concrete types represented by a spaces.
This would allow users to perform important akro operations without needing an explicit reference to the space (and saves a lot of type checking). It would also get rid of a lot of helper/misc functions.
This idea is best illustrated by an example: