Class: Numo::Gnuplot::RgbAlphaData
- Defined in:
- lib/numo/gnuplot.rb
Instance Method Summary collapse
- #check_shape ⇒ Object
-
#initialize(data) ⇒ RgbAlphaData
constructor
:nodoc: all.
Methods inherited from ImageData
Methods inherited from PlotData
array_shape, #cmd_str, #data_format, #data_str, #line_str
Constructor Details
#initialize(data) ⇒ RgbAlphaData
:nodoc: all
1037 1038 1039 1040 1041 1042 1043 |
# File 'lib/numo/gnuplot.rb', line 1037 def initialize(data) if data.kind_of?(Numo::NArray) super(data) else super(Numo::NArray[*data]) end end |
Instance Method Details
#check_shape ⇒ Object
1045 1046 1047 1048 1049 1050 1051 1052 1053 |
# File 'lib/numo/gnuplot.rb', line 1045 def check_shape if @data.shape.size != 3 raise IndexError,"array should be 2-dimensional" end if @data.shape[2] != 4 raise IndexError,"shape[2] (last dimension size) must be 4" end @shape = @data.shape end |