The com.ibm.wala.cast.python.ml.client package is flat (~155 classes), and the numpy-specific generators are distinguished only by an Np/Ndarray name prefix: NpArray, NpReshape, NpOnes, NpZeros, NdarrayReshape, NdarraySubscriptOperation (and the np.ndarray.astype generator).
Proposal
Move the numpy generators into a com.ibm.wala.cast.python.ml.client.numpy subpackage and drop the prefix, so they read as numpy.Array, numpy.Reshape, numpy.Ones, numpy.Zeros, etc. This cleanly disambiguates them from the TensorFlow Ones/Zeros/Reshape generators without prefix noise.
Considerations
- This would be the first subpackage under
client. For consistency it is worth deciding whether the TensorFlow generators should likewise move to a client.tensorflow subpackage, rather than leaving a lone numpy subpackage beside ~149 flat classes.
- Pure refactor (moves + renames + import updates); no behavior change.
Surfaced during ponder-lab#355 (the #539 fix), where NpOnes/NpZeros were added flat to match the existing convention; the packaging question was deferred here.
The
com.ibm.wala.cast.python.ml.clientpackage is flat (~155 classes), and the numpy-specific generators are distinguished only by anNp/Ndarrayname prefix:NpArray,NpReshape,NpOnes,NpZeros,NdarrayReshape,NdarraySubscriptOperation(and thenp.ndarray.astypegenerator).Proposal
Move the numpy generators into a
com.ibm.wala.cast.python.ml.client.numpysubpackage and drop the prefix, so they read asnumpy.Array,numpy.Reshape,numpy.Ones,numpy.Zeros, etc. This cleanly disambiguates them from the TensorFlowOnes/Zeros/Reshapegenerators without prefix noise.Considerations
client. For consistency it is worth deciding whether the TensorFlow generators should likewise move to aclient.tensorflowsubpackage, rather than leaving a lonenumpysubpackage beside ~149 flat classes.Surfaced during ponder-lab#355 (the #539 fix), where
NpOnes/NpZeroswere added flat to match the existing convention; the packaging question was deferred here.