[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] arraydemo.py broken
- To: pygame-users@xxxxxxxx
- Subject: [pygame] arraydemo.py broken
- From: Knapp <magick.crow@xxxxxxxxx>
- Date: Mon, 14 Jul 2008 11:38:44 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 14 Jul 2008 05:38:49 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=Gbj/OGPs34Fo74aqDmDAWMuK0MXyWrhbjTh5AimXShM=; b=KhBQrPsqhUUDQILp9ORSDIS/h4Zq9ONeKQ5P3sZ0V3/eLVRSSWZlz97KJa1g8d0lsI I7KY/FmxDWJmIL98iGchWsT8LEYsBcIC0wgKVWM59ro9wM4I2NUtVQAS7gISr23NE0tB ZvrOzTT3ZV7FB1EPAFED+L6q73fH8M0CF9/88=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=lIaWmADLh0rlsC7l+7LLJ7h1GnbOuA8SV5h7cPYd33ecbO3rDFudXVCSpyQkgm1DK0 e8eEjicxIhzd83fevQS9/T3K0wZ55d4C8U+i2AvcBJWdGNSssmlObC0KBQiY8IO8XAmz eUtxDOV8RjIuU7bP9CNjkcKVZy2tyHwiDvQLc=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello all!
I have been trying to get arraydemo and numeric to work.
I changed for example scaleup by adding the N.Int32s to it. It then works but I can't get soffen to work at all and have the same problems in my own program. It seems that any operation to the array changes it's type and then it will not work with things like array_blit.
This fails but if I take out the +3 it will work.
def __init__(self, Map_Size):
map_size=Map_Size
self.atmosphere_map = zeros((map_size[0], map_size[1],3),Int32) + 3 #all black
#scaleup FIXED
size = N.array(imgarray.shape, N.Int32)*2
scaleup = N.zeros(size, N.Int32)
scaleup[::2,::2] = imgarray
scaleup[1::2,::2] = imgarray
scaleup[:,1::2] = scaleup[:,::2]
surfdemo_show(scaleup, 'scaleup')
Any advice about what is wrong and how to make it work will be wonderful!
Thanks,
--
Douglas E Knapp
http://sf-journey-creations.wikispot.org/Front_Page