[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dennou-ruby:002771] GPhys#replace_val
- To: dennou-ruby@xxxxxxxxxxx
- Subject: [dennou-ruby:002771] GPhys#replace_val
- From: Sato Hiroshi <hirocy.f01@xxxxxxxx>
- Date: Fri, 23 Mar 2007 20:02:56 +0900
hirocyです.
gphys-0.5.4を使わせていただいてます.
GPhys#replace_valがうまく動かないようです.
意味の無い処理のサンプルですが,以下のようになります.
irb(main):001:0> g = GPhys::IO.open('test.nc','t')
=> <GPhys grid=<略> data=<略>>
irb(main):002:0> g.replace_val(g.val)
RuntimeError: The shape method is not available. Use shape_ul0 or shape_current instead.
from /usr/local/lib/ruby/site_ruby/1.8/numru/gphys/varraynetcdf.rb:244:in `shape'
from /usr/local/lib/ruby/site_ruby/1.8/numru/gphys/varray.rb:384:in `replace_val'
from /usr/local/lib/ruby/site_ruby/1.8/numru/gphys/gphys.rb:502:in `replace_val'
from (irb):2
コードを見てみたところ,varraynetcdf.rb内でshapeの使用を禁止されて
いるにも関わらず他で呼び出されている,ということのようです.
(varraynetcdf.rb ll.241-245)
> # It is safer not to have the method "shape" to avoid misconfusion of
> # shape_ul0 and shape_current:
> def shape
> raise "The shape method is not available. Use shape_ul0 or
> shape_current instead."
> end
#もし私の勘違いだったらすみません...
--
// hirocy