MCPcopy
hub / github.com/WassimTenachi/PhySO / set_units

Method set_units

physo/physym/vect_programs.py:1219–1233  ·  view source on GitHub ↗

Sets units properties of tokens of coordinates coords_dest with new values given in args. Parameters ---------- coords_dest : numpy.array of shape (2, ?) of int Coords where to set new tokens, 0th array in batch dim and 1th array in time dim. new_

(self, coords_dest, new_is_constraining_phy_units, new_phy_units)

Source from the content-addressed store, hash-verified

1217 return None
1218
1219 def set_units (self, coords_dest, new_is_constraining_phy_units, new_phy_units):
1220 """
1221 Sets units properties of tokens of coordinates coords_dest with new values given in args.
1222 Parameters
1223 ----------
1224 coords_dest : numpy.array of shape (2, ?) of int
1225 Coords where to set new tokens, 0th array in batch dim and 1th array in time dim.
1226 new_is_constraining_phy_units : numpy.array of shape (?,) of bool
1227 New value to set for is_constraining_phy_units.
1228 new_phy_units : numpy.array of shape (?, Tok.UNITS_VECTOR_SIZE) of float
1229 New value to set for phy_units.
1230 """
1231 self.tokens.is_constraining_phy_units [coords_dest[0], coords_dest[1]] = new_is_constraining_phy_units
1232 self.tokens.phy_units [coords_dest[0], coords_dest[1]] = new_phy_units
1233 return None
1234
1235 # -------- SET NON_POSITIONAL INFO --------
1236

Callers 2

appendMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected