Initializes the SOMPlots class with specified dimensions for the SOM grid. This constructor
sets up the underlying SOM or SOMGpu infrastructure, depending on the availability of CuPy.
Parameters:
dimensions (array-like, tuple, or int) – A tuple specifying the dimensions (rows, columns) of the SOM grid.