[kepler-users] reading ascii as array

Matthew Jones jones at nceas.ucsb.edu
Wed Aug 1 09:23:23 PDT 2007


Yes, just change around the workflow to extract the parts of the arrays 
that you want to pass on to other actors.  If you search for array 
you'll see all of the array manipulation actors.

Making sure your types are cast correctly can at times be difficult, but 
often works out if the system can determine how to do the type cast 
itself.  If not, you'll need to force the conversion first.

Matt

[BE] Ufuk Utku Turuncoglu wrote:
> Hi,
> 
> Thank you for your help. I read ascii file successfully but now i need 
> to calculate minimum and maximum of the each column. So, Sequence To 
> Array actor generates array but when i try to use Array Minimum actor it 
> gives the,
> 
> ptolemy.data.ArrayToken cannot be cast to pyolemy.data.ScalarToken
> 
> i also use Array Element to split the columns of array and it also fails 
> but it gets only first element of the specified column. So, is there any 
> other way to reach each column seperately an an array type? If not i 
> will try to split the ascii file as to sperate files which has different 
> columns.
> 
> Additionaly, i will also ask to Sequence To Array actor generates the 
> ArrayType(String) type data but my data is in double type. Does it 
> generate error or mis calculation when doing arithmetic operation.
> 
> Thanks again,
> Best wishes
> 
> Ufuk
> 
> 
> Matthew Jones wrote:
>> Hi Ufuk,
>>
>> Attached is an example workflow that shows you some of the techniques 
>> to use to solve your issue.  It reads a 2 column csv file and outputs 
>> an array of arrays.  Hope it helps.
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Matthew B. Jones
Director of Informatics Research and Development
National Center for Ecological Analysis and Synthesis (NCEAS)
UC Santa Barbara
jones at nceas.ucsb.edu
http://www.nceas.ucsb.edu/ecoinfo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


More information about the Kepler-users mailing list