koaning/whatlies

Assign should also allow for values.

koaning opened this issue · 1 comments

Would we be opposed to allowing this?

embset.assign(property=1)

As opposed to this:

embset.assign(property=lambda e: 1)

I still want to support the latter due to the flexibility. But the direct value could be a more consise way of dealing with it many use-cases surrounding adding a property to add a color to a plot.

mkaze commented

I am also in favor of it (having callables and non-callables as the value of property) since I don't see any harm in supporting that, and potentially, as you mentioned, it might simplify the use cases where all the embeddings should have the same property value.