comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Array to Scalar
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array to Scalar [message #4938] Wed, 23 August 1995 00:00
sanjay is currently offline  sanjay
Messages: 5
Registered: April 1993
Junior Member
I noticed, accidentally, that the multiplication of an array
by a scalar and multiplication of an array by an array of length 1
gives two different answers. Even though this is to be expected
for general arrays, there needs to be an exception for array of
size 1.

Consider the following example:

a=findgen(10)
; unrelated code
factor=interpol(....)

factor returns array of size 1 and if I use

a=a*factor

I am left with just one value whereas I expect
an array of size 10 each of the elments multiplied by factor!

My 2 cents worth!.

-sanjay
[Message index]
 
Read Message
Previous Topic: Generic audit trail converter
Next Topic: Query: How to import Color Tables

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 01:56:24 PDT 2025

Total time taken to generate the page: 0.56124 seconds