Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!81.171.118.61.MISMATCH!peer01.fr7!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail From: "AK" Newsgroups: pl.comp.programming Subject: =?utf-8?Q?Re:_Kalkulator_z_du=C5=BCymi_liczbami?= Date: Wed, 2 Sep 2015 10:56:09 +0200 Organization: ATMAN - ATM S.A. Lines: 28 Message-ID: References: <1co660zqhr06x.sfdcgdza75j4$.dlg@40tude.net> <9fmdddd6wxm6.1t8zrc1z9u4eg.dlg@40tude.net> <1ms87fzpv1819.2wqzgjba56ye.dlg@40tude.net> NNTP-Posting-Host: dynamic62-133-147-224.ostnet.pl Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: node2.news.atman.pl 1441184173 23000 62.133.147.224 (2 Sep 2015 08:56:13 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Wed, 2 Sep 2015 08:56:13 +0000 (UTC) In-Reply-To: <1ms87fzpv1819.2wqzgjba56ye.dlg@40tude.net> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-Antivirus: avast! (VPS 150901-0, 2015-09-01), Outbound message X-Antivirus-Status: Clean X-Received-Bytes: 2117 X-Received-Body-CRC: 3965026147 Xref: csiph.com pl.comp.programming:27325 Użytkownik "szemrany" napisał: > A nie ma w Pythonie czegoś takiego jak rzutowanie na typ o rozmiarze > shortint/int32/int64? Nie ma rzutowania (i bardzo dobrze;). Sa odpowiednie typy/pakiety wprost do uzycia. Jedna z alternatyw: D:\_DiskP_\PythonJava.INS\JTypes\JTypes\jt\_jvm>p >>> import numpy as np >>> np.int16 numpy.int16 >>> np.int16(22) * np.int16(221) 4862 >>> np.int16(22) * np.int16(2211) D:\VEnv\A\Scripts\ipython:1: RuntimeWarning: overflow encountered in short_scalars -16894 >>> AK --- Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast. https://www.avast.com/antivirus