From: Maurizio Cirilli Date: 2010-10-27T21:05:21+09:00 Subject: Re: Extraction of single subarrays from multidimensional array Dear Robert, this is I want to do: (1) extract subarrays from a md-arrays (but the number of subarrays can vary from case to case) (2) use separated subarrays to make all possible nucleotide sequences is possible to build from them permutating the codons at each position (row) i.e. all the 6*2*6 sequences 9 nucleotide long in my example (3) convert them to string and put in a single array ( this is required for compatibility with BioRuby classes and methods that deal withDNA sequences as strings) (4) make further analysis on these sequences by BioRuby. That's it. While is clear to me how to do points 2,3 and 4 I really struggled how to accomplish point 1 , which is the subject of this thread. -- Maurizio On Oct 27, 12:46 pm, Robert Klemme wrote: > On Wed, Oct 27, 2010 at 12:15 PM, Maurizio Cirilli wrote: > > OK, so  looks like there is no way with Ruby to extract > > single subarrays from md-arrays with unknown dimensions. > > I can only chime in to what Alex wrote: you *can* extract arrays from > arbitrary nested arrays but generating variable names is almost > certainly the wrong way to go about it.  What exactly do you want to > do?  Can you describe the input and what you want to do with it with > more context than you provided so far? > > Cheers > > robert > > -- > remember.guy do |as, often| as.you_can - without endhttp://blog.rubybestpractices.com/