You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
| 2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
| 2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
| 2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jd...@us...> - 2009-08-05 17:16:06
|
Revision: 7387
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7387&view=rev
Author: jdh2358
Date: 2009-08-05 17:16:00 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
added INTC sample data
Added Paths:
-----------
trunk/sample_data/INTC.dat
Added: trunk/sample_data/INTC.dat
===================================================================
(Binary files differ)
Property changes on: trunk/sample_data/INTC.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-05 16:56:00
|
Revision: 7386
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7386&view=rev
Author: jswhit
Date: 2009-08-05 16:55:48 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
fix bug preventing drawing of parallels in some projections.
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-05 16:30:55 UTC (rev 7385)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2009-08-05 16:55:48 UTC (rev 7386)
@@ -1789,8 +1789,7 @@
yd = (y[1:]-y[0:-1])**2
dist = np.sqrt(xd+yd)
split = dist > 500000.
- if np.sum(split) and self.projection not in \
- ['cyl', 'merc', 'mill', 'gall', 'moll', 'robin', 'sinu', 'mbtfpq']:
+ if np.sum(split) and self.projection not in _cylproj:
ind = (np.compress(split,np.squeeze(split*np.indices(xd.shape)))+1).tolist()
xl = []
yl = []
@@ -2028,7 +2027,7 @@
yd = (y[1:]-y[0:-1])**2
dist = np.sqrt(xd+yd)
split = dist > 500000.
- if np.sum(split) and self.projection not in _cylproj + _pseudocyl:
+ if np.sum(split) and self.projection not in _cylproj:
ind = (np.compress(split,np.squeeze(split*np.indices(xd.shape)))+1).tolist()
xl = []
yl = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 16:31:02
|
Revision: 7385
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7385&view=rev
Author: jdh2358
Date: 2009-08-05 16:30:55 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
fixed a couple of missing cbook imports in sample_data examples
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/image_demo3.py
trunk/matplotlib/examples/pylab_examples/logo.py
Modified: trunk/matplotlib/examples/pylab_examples/image_demo3.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo3.py 2009-08-05 16:24:03 UTC (rev 7384)
+++ trunk/matplotlib/examples/pylab_examples/image_demo3.py 2009-08-05 16:30:55 UTC (rev 7385)
@@ -5,8 +5,10 @@
except ImportError, exc:
raise SystemExit("PIL must be installed to run this example")
+import matplotlib.cbook as cbook
+
datafile = cbook.get_sample_data('lena.jpg')
-lena = cbook.Image.open(datafile)
+lena = Image.open(datafile)
dpi = rcParams['figure.dpi']
figsize = lena.size[0]/dpi, lena.size[1]/dpi
Modified: trunk/matplotlib/examples/pylab_examples/logo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:24:03 UTC (rev 7384)
+++ trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:30:55 UTC (rev 7385)
@@ -1,8 +1,8 @@
#!/usr/bin/env python
# This file generates the matplotlib web page logo
from pylab import *
+import matplotlib.cbook as cbook
-
# convert data to mV
datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
print 'loading', datafile
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 16:24:14
|
Revision: 7384
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7384&view=rev
Author: jdh2358
Date: 2009-08-05 16:24:03 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
fixed typo in sample data examples
Modified Paths:
--------------
trunk/matplotlib/examples/api/watermark_image.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py
Modified: trunk/matplotlib/examples/api/watermark_image.py
===================================================================
--- trunk/matplotlib/examples/api/watermark_image.py 2009-08-05 16:23:06 UTC (rev 7383)
+++ trunk/matplotlib/examples/api/watermark_image.py 2009-08-05 16:24:03 UTC (rev 7384)
@@ -8,7 +8,7 @@
import matplotlib.image as image
import matplotlib.pyplot as plt
-datafile = cbook.get_sample_data('logo2.png', asobj=False)
+datafile = cbook.get_sample_data('logo2.png', asfileobj=False)
print 'loading', datafile
im = image.imread(datafile)
im[:,:,-1] = 0.5 # set the alpha channel
Modified: trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-08-05 16:23:06 UTC (rev 7383)
+++ trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-08-05 16:24:03 UTC (rev 7384)
@@ -102,7 +102,7 @@
class MyApp(wx.App):
def OnInit(self):
- xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asobj=False)
+ xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asfileobj=False)
print 'loading', xrcfile
self.res = xrc.XmlResource(xrcfile)
Modified: trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py 2009-08-05 16:23:06 UTC (rev 7383)
+++ trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py 2009-08-05 16:24:03 UTC (rev 7384)
@@ -10,7 +10,7 @@
import mpl_toolkits.gtktools as gtktools
-datafile = cbook.get_sample_data('demodata.csv', asobj=False)
+datafile = cbook.get_sample_data('demodata.csv', asfileobj=False)
r = mlab.csv2rec(datafile, converterd={'weekdays':str})
Modified: trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py 2009-08-05 16:23:06 UTC (rev 7383)
+++ trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py 2009-08-05 16:24:03 UTC (rev 7384)
@@ -8,7 +8,7 @@
import matplotlib.cbook as cbook
import mpl_toolkits.gtktools as gtktools
-datafile = cbook.get_sample_data('demodata.csv', asobj=False)
+datafile = cbook.get_sample_data('demodata.csv', asfileobj=False)
r = mlab.csv2rec(datafile, converterd={'weekdays':str})
liststore, treeview, win = gtktools.edit_recarray(r)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 16:23:16
|
Revision: 7383
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7383&view=rev
Author: jdh2358
Date: 2009-08-05 16:23:06 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
removed examples/data; ported all examples to use sample_data
Modified Paths:
--------------
trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
trunk/matplotlib/examples/pylab_examples/image_demo2.py
trunk/matplotlib/examples/pylab_examples/load_converter.py
trunk/matplotlib/examples/pylab_examples/loadrec.py
trunk/matplotlib/examples/pylab_examples/logo.py
trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
Modified: trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -14,7 +14,7 @@
import matplotlib.cbook as cbook
from matplotlib.ticker import Formatter
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
r = csv2rec(datafile)[-40:]
Modified: trunk/matplotlib/examples/pylab_examples/image_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -1,9 +1,10 @@
#!/usr/bin/env python
from pylab import *
+import matplotlib.cbook as cbook
w, h = 512, 512
-datafile = cbook.get_sample_data('ct.raw', asobj=False)
+datafile = cbook.get_sample_data('ct.raw', asfileobj=False)
print 'loading', datafile
s = file(datafile, 'rb').read()
A = fromstring(s, uint16).astype(float)
Modified: trunk/matplotlib/examples/pylab_examples/load_converter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -4,7 +4,7 @@
from pylab import figure, show
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
dates, closes = np.loadtxt(
Modified: trunk/matplotlib/examples/pylab_examples/loadrec.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -2,7 +2,7 @@
from pylab import figure, show
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('msft.csv', asobj=False)
+datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
print 'loading', datafile
a = mlab.csv2rec(datafile)
a.sort()
Modified: trunk/matplotlib/examples/pylab_examples/logo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -4,7 +4,7 @@
# convert data to mV
-datafile = cbook.get_sample_data('membrane.dat', asobj=False)
+datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
print 'loading', datafile
x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32)
Modified: trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:21:23 UTC (rev 7382)
+++ trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:23:06 UTC (rev 7383)
@@ -1,8 +1,8 @@
from pylab import plotfile, show, gca
import matplotlib.cbook as cbook
-fname = cbook.get_sample_data('msft.csv', asobj=False)
-fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asobj=False)
+fname = cbook.get_sample_data('msft.csv', asfileobj=False)
+fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asfileobj=False)
# test 1; use ints
plotfile(fname, (0,5,6))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 16:21:38
|
Revision: 7382
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7382&view=rev
Author: jdh2358
Date: 2009-08-05 16:21:23 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
removed examples/data; ported all examples to use sample_data
Modified Paths:
--------------
trunk/matplotlib/examples/api/watermark_image.py
trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
trunk/matplotlib/examples/pylab_examples/image_demo2.py
trunk/matplotlib/examples/pylab_examples/image_demo3.py
trunk/matplotlib/examples/pylab_examples/load_converter.py
trunk/matplotlib/examples/pylab_examples/loadrec.py
trunk/matplotlib/examples/pylab_examples/logo.py
trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py
trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py
trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py
Added Paths:
-----------
trunk/sample_data/ct.raw
trunk/sample_data/data_x_x2_x3.csv
trunk/sample_data/demodata.csv
trunk/sample_data/eeg.dat
trunk/sample_data/embedding_in_wx3.xrc
trunk/sample_data/lena.jpg
trunk/sample_data/logo2.png
trunk/sample_data/membrane.dat
trunk/sample_data/msft.csv
trunk/sample_data/s1045.ima
Removed Paths:
-------------
trunk/matplotlib/examples/data/
Modified: trunk/matplotlib/examples/api/watermark_image.py
===================================================================
--- trunk/matplotlib/examples/api/watermark_image.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/api/watermark_image.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -4,11 +4,13 @@
import numpy as np
import matplotlib
matplotlib.use('Agg')
-
+import matplotlib.cbook as cbook
import matplotlib.image as image
import matplotlib.pyplot as plt
-im = image.imread('../data/logo2.png')
+datafile = cbook.get_sample_data('logo2.png', asobj=False)
+print 'loading', datafile
+im = image.imread(datafile)
im[:,:,-1] = 0.5 # set the alpha channel
fig = plt.figure()
Modified: trunk/matplotlib/examples/pylab_examples/date_index_formatter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/date_index_formatter.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -11,9 +11,12 @@
import numpy
from matplotlib.mlab import csv2rec
from pylab import figure, show
+import matplotlib.cbook as cbook
from matplotlib.ticker import Formatter
-r = csv2rec('../data/msft.csv')[-40:]
+datafile = cbook.get_sample_data('msft.csv', asobj=False)
+print 'loading', datafile
+r = csv2rec(datafile)[-40:]
class MyFormatter(Formatter):
def __init__(self, dates, fmt='%Y-%m-%d'):
Modified: trunk/matplotlib/examples/pylab_examples/image_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/image_demo2.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -2,7 +2,10 @@
from pylab import *
w, h = 512, 512
-s = file('../data/ct.raw', 'rb').read()
+
+datafile = cbook.get_sample_data('ct.raw', asobj=False)
+print 'loading', datafile
+s = file(datafile, 'rb').read()
A = fromstring(s, uint16).astype(float)
A *= 1.0/max(A)
A.shape = w, h
Modified: trunk/matplotlib/examples/pylab_examples/image_demo3.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_demo3.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/image_demo3.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -5,7 +5,8 @@
except ImportError, exc:
raise SystemExit("PIL must be installed to run this example")
-lena = Image.open('../data/lena.jpg')
+datafile = cbook.get_sample_data('lena.jpg')
+lena = cbook.Image.open(datafile)
dpi = rcParams['figure.dpi']
figsize = lena.size[0]/dpi, lena.size[1]/dpi
Modified: trunk/matplotlib/examples/pylab_examples/load_converter.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/load_converter.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -2,9 +2,13 @@
#from matplotlib.mlab import load
import numpy as np
from pylab import figure, show
+import matplotlib.cbook as cbook
+datafile = cbook.get_sample_data('msft.csv', asobj=False)
+print 'loading', datafile
+
dates, closes = np.loadtxt(
- '../data/msft.csv', delimiter=',',
+ datafile, delimiter=',',
converters={0:strpdate2num('%d-%b-%y')},
skiprows=1, usecols=(0,2), unpack=True)
Modified: trunk/matplotlib/examples/pylab_examples/loadrec.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/loadrec.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -1,7 +1,10 @@
from matplotlib import mlab
from pylab import figure, show
+import matplotlib.cbook as cbook
-a = mlab.csv2rec('../data/msft.csv')
+datafile = cbook.get_sample_data('msft.csv', asobj=False)
+print 'loading', datafile
+a = mlab.csv2rec(datafile)
a.sort()
print a.dtype
Modified: trunk/matplotlib/examples/pylab_examples/logo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/logo.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -4,8 +4,10 @@
# convert data to mV
-x = 1000*0.1*fromstring(
- file('../data/membrane.dat', 'rb').read(), float32)
+datafile = cbook.get_sample_data('membrane.dat', asobj=False)
+print 'loading', datafile
+
+x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32)
# 0.0005 is the sample interval
t = 0.0005*arange(len(x))
figure(1, figsize=(7,1), dpi=100)
Modified: trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/mri_with_eeg.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -9,12 +9,13 @@
from matplotlib.pyplot import *
from matplotlib.collections import LineCollection
-
+import matplotlib.cbook as cbook
# I use if 1 to break up the different regions of code visually
if 1: # load the data
# data are 256x256 16 bit integers
- dfile = '../data/s1045.ima'
+ dfile = cbook.get_sample_data('s1045.ima', asfileobj=False)
+ print 'loading image', dfile
im = np.fromstring(file(dfile, 'rb').read(), np.uint16).astype(float)
im.shape = 256, 256
@@ -38,7 +39,9 @@
# load the data
numSamples, numRows = 800,4
- data = np.fromstring(file('../data/eeg.dat', 'rb').read(), float)
+ eegfile = cbook.get_sample_data('eeg.dat', asfileobj=False)
+ print 'loading eeg', eegfile
+ data = np.fromstring(file(eegfile, 'rb').read(), float)
data.shape = numSamples, numRows
t = 10.0 * np.arange(numSamples, dtype=float)/numSamples
ticklocs = []
Modified: trunk/matplotlib/examples/pylab_examples/plotfile_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/pylab_examples/plotfile_demo.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -1,7 +1,8 @@
from pylab import plotfile, show, gca
+import matplotlib.cbook as cbook
-fname = '../data/msft.csv'
-fname2 = '../data/data_x_x2_x3.csv'
+fname = cbook.get_sample_data('msft.csv', asobj=False)
+fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asobj=False)
# test 1; use ints
plotfile(fname, (0,5,6))
Modified: trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/user_interfaces/embedding_in_wx3.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -27,6 +27,7 @@
import matplotlib
matplotlib.use('WXAgg')
import matplotlib.cm as cm
+import matplotlib.cbook as cbook
from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg
from matplotlib.figure import Figure
import numpy as npy
@@ -101,8 +102,9 @@
class MyApp(wx.App):
def OnInit(self):
- xrcfile = os.path.join(os.path.dirname(__file__),"..","data",
- "embedding_in_wx3.xrc")
+ xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asobj=False)
+ print 'loading', xrcfile
+
self.res = xrc.XmlResource(xrcfile)
# main frame and panel ---------
Modified: trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_custom.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -6,11 +6,14 @@
import gtk
import numpy as np
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
import mpl_toolkits.gtktools as gtktools
-r = mlab.csv2rec('data/demodata.csv', converterd={'weekdays':str})
+datafile = cbook.get_sample_data('demodata.csv', asobj=False)
+r = mlab.csv2rec(datafile, converterd={'weekdays':str})
+
formatd = mlab.get_formatd(r)
formatd['date'] = mlab.FormatDate('%Y-%m-%d')
formatd['prices'] = mlab.FormatMillions(precision=1)
Modified: trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py
===================================================================
--- trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py 2009-08-05 16:05:38 UTC (rev 7381)
+++ trunk/matplotlib/examples/user_interfaces/rec_edit_gtk_simple.py 2009-08-05 16:21:23 UTC (rev 7382)
@@ -5,9 +5,11 @@
import gtk
import numpy as np
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
import mpl_toolkits.gtktools as gtktools
-r = mlab.csv2rec('data/demodata.csv', converterd={'weekdays':str})
+datafile = cbook.get_sample_data('demodata.csv', asobj=False)
+r = mlab.csv2rec(datafile, converterd={'weekdays':str})
liststore, treeview, win = gtktools.edit_recarray(r)
win.set_title('click to edit')
Copied: trunk/sample_data/ct.raw (from rev 7377, trunk/matplotlib/examples/data/ct.raw)
===================================================================
--- trunk/sample_data/ct.raw (rev 0)
+++ trunk/sample_data/ct.raw 2009-08-05 16:21:23 UTC (rev 7382)
@@ -0,0 +1,2352 @@
+ |
|
From: <evi...@us...> - 2009-08-05 16:05:45
|
Revision: 7381
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7381&view=rev
Author: evilguru
Date: 2009-08-05 16:05:38 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Fix an off-by-one error in FT2Font. This is based off of r14 in mathtex.
Modified Paths:
--------------
branches/mathtex/src/ft2font.cpp
Modified: branches/mathtex/src/ft2font.cpp
===================================================================
--- branches/mathtex/src/ft2font.cpp 2009-08-05 15:59:24 UTC (rev 7380)
+++ branches/mathtex/src/ft2font.cpp 2009-08-05 16:05:38 UTC (rev 7381)
@@ -206,7 +206,7 @@
y1 = std::min(y1, _height);
for (size_t j=y0; j<y1+1; j++) {
- for (size_t i=x0; i<x1+1; i++) {
+ for (size_t i=x0; i<x1; i++) {
_buffer[i + j*_width] = 255;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:59:34
|
Revision: 7380
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7380&view=rev
Author: jdh2358
Date: 2009-08-05 15:59:24 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
port more examples over to sample data
Modified Paths:
--------------
trunk/matplotlib/examples/api/date_index_formatter.py
trunk/matplotlib/examples/misc/rec_groupby_demo.py
trunk/matplotlib/examples/misc/rec_join_demo.py
Modified: trunk/matplotlib/examples/api/date_index_formatter.py
===================================================================
--- trunk/matplotlib/examples/api/date_index_formatter.py 2009-08-05 15:57:31 UTC (rev 7379)
+++ trunk/matplotlib/examples/api/date_index_formatter.py 2009-08-05 15:59:24 UTC (rev 7380)
@@ -9,7 +9,7 @@
import matplotlib.cbook as cbook
import matplotlib.ticker as ticker
-datafile = cbook.get_sample_data('aapl.csv', asobj=False)
+datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
print 'loading', datafile
r = mlab.csv2rec(datafile)
Modified: trunk/matplotlib/examples/misc/rec_groupby_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/rec_groupby_demo.py 2009-08-05 15:57:31 UTC (rev 7379)
+++ trunk/matplotlib/examples/misc/rec_groupby_demo.py 2009-08-05 15:59:24 UTC (rev 7380)
@@ -2,11 +2,9 @@
import matplotlib.mlab as mlab
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('aapl.csv', asobj=False)
+datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
print 'loading', datafile
r = mlab.csv2rec(datafile)
-
-r = mlab.csv2rec('../data/aapl.csv')
r.sort()
def daily_return(prices):
Modified: trunk/matplotlib/examples/misc/rec_join_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/rec_join_demo.py 2009-08-05 15:57:31 UTC (rev 7379)
+++ trunk/matplotlib/examples/misc/rec_join_demo.py 2009-08-05 15:59:24 UTC (rev 7380)
@@ -2,7 +2,7 @@
import matplotlib.mlab as mlab
import matplotlib.cbook as cbook
-datafile = cbook.get_sample_data('aapl.csv', asobj=False)
+datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
print 'loading', datafile
r = mlab.csv2rec(datafile)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:57:41
|
Revision: 7379
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7379&view=rev
Author: jdh2358
Date: 2009-08-05 15:57:31 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
port more examples over to same data
Modified Paths:
--------------
trunk/matplotlib/examples/api/date_index_formatter.py
trunk/matplotlib/examples/misc/rec_groupby_demo.py
trunk/matplotlib/examples/misc/rec_join_demo.py
Added Paths:
-----------
trunk/sample_data/aapl.csv
Removed Paths:
-------------
trunk/matplotlib/examples/data/AAPL.dat
trunk/matplotlib/examples/data/INTC.dat
trunk/matplotlib/examples/data/aapl.csv
Modified: trunk/matplotlib/examples/api/date_index_formatter.py
===================================================================
--- trunk/matplotlib/examples/api/date_index_formatter.py 2009-08-05 15:53:11 UTC (rev 7378)
+++ trunk/matplotlib/examples/api/date_index_formatter.py 2009-08-05 15:57:31 UTC (rev 7379)
@@ -6,9 +6,13 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
import matplotlib.ticker as ticker
-r = mlab.csv2rec('../data/aapl.csv')
+datafile = cbook.get_sample_data('aapl.csv', asobj=False)
+print 'loading', datafile
+r = mlab.csv2rec(datafile)
+
r.sort()
r = r[-30:] # get the last 30 days
Deleted: trunk/matplotlib/examples/data/AAPL.dat
===================================================================
--- trunk/matplotlib/examples/data/AAPL.dat 2009-08-05 15:53:11 UTC (rev 7378)
+++ trunk/matplotlib/examples/data/AAPL.dat 2009-08-05 15:57:31 UTC (rev 7379)
@@ -1,725 +0,0 @@
- |
|
From: <jd...@us...> - 2009-08-05 15:53:17
|
Revision: 7378
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7378&view=rev
Author: jdh2358
Date: 2009-08-05 15:53:11 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
moved the mpl example data to sample data and ported over the examples
Removed Paths:
-------------
trunk/matplotlib/lib/matplotlib/mpl-data/example/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:52:38
|
Revision: 7377
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7377&view=rev
Author: jdh2358
Date: 2009-08-05 15:52:29 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
moved the mpl example data to sample data and ported over the examples
Modified Paths:
--------------
trunk/matplotlib/examples/api/date_demo.py
trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
trunk/matplotlib/lib/matplotlib/__init__.py
Added Paths:
-----------
trunk/sample_data/aapl.npy
trunk/sample_data/goog.npy
trunk/sample_data/msft_nasdaq.npy
Removed Paths:
-------------
trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy
trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy
Modified: trunk/matplotlib/examples/api/date_demo.py
===================================================================
--- trunk/matplotlib/examples/api/date_demo.py 2009-08-05 15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/examples/api/date_demo.py 2009-08-05 15:52:29 UTC (rev 7377)
@@ -17,6 +17,7 @@
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
years = mdates.YearLocator() # every year
months = mdates.MonthLocator() # every month
@@ -26,7 +27,7 @@
# open, close, volume, adj_close from the mpl-data/example directory.
# The record array stores python datetime.date as an object array in
# the date column
-datafile = matplotlib.get_example_data('goog.npy')
+datafile = cbook.get_sample_data('goog.npy')
r = np.load(datafile).view(np.recarray)
fig = plt.figure()
Modified: trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py 2009-08-05 15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/examples/pylab_examples/centered_ticklabels.py 2009-08-05 15:52:29 UTC (rev 7377)
@@ -15,12 +15,13 @@
import datetime
import numpy as np
import matplotlib
+import matplotlib.cbook as cbook
import matplotlib.dates as dates
import matplotlib.ticker as ticker
import matplotlib.pyplot as plt
# load some financial data; apple's stock price
-fh = matplotlib.get_example_data('aapl.npy')
+fh = cbook.get_sample_data('aapl.npy')
r = np.load(fh); fh.close()
r = r[-250:] # get the last 250 days
Modified: trunk/matplotlib/examples/pylab_examples/scatter_demo2.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/scatter_demo2.py 2009-08-05 15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/examples/pylab_examples/scatter_demo2.py 2009-08-05 15:52:29 UTC (rev 7377)
@@ -5,12 +5,13 @@
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
+import matplotlib.cbook as cbook
# load a numpy record array from yahoo csv data with fields date,
# open, close, volume, adj_close from the mpl-data/example directory.
# The record array stores python datetime.date as an object array in
# the date column
-datafile = matplotlib.get_example_data('goog.npy')
+datafile = cbook.get_sample_data('goog.npy')
r = np.load(datafile).view(np.recarray)
r = r[-250:] # get the most recent 250 trading days
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2009-08-05 15:47:20 UTC (rev 7376)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2009-08-05 15:52:29 UTC (rev 7377)
@@ -490,17 +490,9 @@
def get_example_data(fname):
"""
- return a filehandle to one of the example files in mpl-data/example
-
- *fname*
- the name of one of the files in mpl-data/example
+ get_example_data is deprecated -- use matplotlib.cbook.get_sample_data instead
"""
- datadir = os.path.join(get_data_path(), 'example')
- fullpath = os.path.join(datadir, fname)
- if not os.path.exists(fullpath):
- raise IOError('could not find matplotlib example file "%s" in data directory "%s"'%(
- fname, datadir))
- return file(fullpath, 'rb')
+ raise NotImplementedError('get_example_data is deprecated -- use matplotlib.cbook.get_sample_data instead')
def get_py2exe_datafiles():
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy
===================================================================
(Binary files differ)
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy
===================================================================
(Binary files differ)
Deleted: trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy
===================================================================
(Binary files differ)
Copied: trunk/sample_data/aapl.npy (from rev 7363, trunk/matplotlib/lib/matplotlib/mpl-data/example/aapl.npy)
===================================================================
(Binary files differ)
Copied: trunk/sample_data/goog.npy (from rev 7363, trunk/matplotlib/lib/matplotlib/mpl-data/example/goog.npy)
===================================================================
(Binary files differ)
Copied: trunk/sample_data/msft_nasdaq.npy (from rev 7363, trunk/matplotlib/lib/matplotlib/mpl-data/example/msft_nasdaq.npy)
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2009-08-05 15:47:38
|
Revision: 7376
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7376&view=rev
Author: jswhit
Date: 2009-08-05 15:47:20 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
apply sf patch 2831704, regnerate c source files with cython 0.11.2
Modified Paths:
--------------
trunk/toolkits/basemap/src/_geod.c
trunk/toolkits/basemap/src/_geoslib.c
trunk/toolkits/basemap/src/_proj.c
trunk/toolkits/basemap/src/geod_set.c
Modified: trunk/toolkits/basemap/src/_geod.c
===================================================================
--- trunk/toolkits/basemap/src/_geod.c 2009-08-05 15:43:54 UTC (rev 7375)
+++ trunk/toolkits/basemap/src/_geod.c 2009-08-05 15:47:20 UTC (rev 7376)
@@ -1,8 +1,11 @@
-/* Generated by Cython 0.10.3 on Wed Dec 17 15:57:33 2008 */
+/* Generated by Cython 0.11.2 on Wed Aug 5 09:35:57 2009 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
@@ -11,11 +14,13 @@
#endif
#if PY_VERSION_HEX < 0x02040000
#define METH_COEXIST 0
+ #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
#endif
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
+ #define PY_FORMAT_SIZE_T ""
#define PyInt_FromSsize_t(z) PyInt_FromLong(z)
#define PyInt_AsSsize_t(o) PyInt_AsLong(o)
#define PyNumber_Index(o) PyNumber_Int(o)
@@ -45,7 +50,6 @@
#define PyBUF_SIMPLE 0
#define PyBUF_WRITABLE 0x0001
- #define PyBUF_LOCK 0x0002
#define PyBUF_FORMAT 0x0004
#define PyBUF_ND 0x0008
#define PyBUF_STRIDES (0x0010 | PyBUF_ND)
@@ -70,6 +74,7 @@
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyString_Type PyBytes_Type
+ #define PyString_CheckExact PyBytes_CheckExact
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
@@ -98,9 +103,29 @@
#ifndef __cdecl
#define __cdecl
#endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
#else
+ #define isnan _isnan
#define _USE_MATH_DEFINES
#endif
+#if PY_VERSION_HEX < 0x02050000
+ #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
+ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
+ #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
+#else
+ #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
+ #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
+ #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
+#endif
+#if PY_VERSION_HEX < 0x02050000
+ #define __Pyx_NAMESTR(n) ((char *)(n))
+ #define __Pyx_DOCSTR(n) ((char *)(n))
+#else
+ #define __Pyx_NAMESTR(n) (n)
+ #define __Pyx_DOCSTR(n) (n)
+#endif
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
@@ -112,6 +137,7 @@
#include "math.h"
#include "geodesic.h"
#include "proj_api.h"
+#define __PYX_USE_C99_COMPLEX defined(_Complex_I)
#ifdef __GNUC__
@@ -132,33 +158,54 @@
/* Type Conversion Predeclarations */
#if PY_MAJOR_VERSION < 3
-#define __Pyx_PyBytes_FromString PyString_FromString
-#define __Pyx_PyBytes_AsString PyString_AsString
+#define __Pyx_PyBytes_FromString PyString_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyString_FromStringAndSize
+#define __Pyx_PyBytes_AsString PyString_AsString
#else
-#define __Pyx_PyBytes_FromString PyBytes_FromString
-#define __Pyx_PyBytes_AsString PyBytes_AsString
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+#define __Pyx_PyBytes_AsString PyBytes_AsString
#endif
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
-static INLINE int __Pyx_PyObject_IsTrue(PyObject* x);
-static INLINE PY_LONG_LONG __pyx_PyInt_AsLongLong(PyObject* x);
-static INLINE unsigned PY_LONG_LONG __pyx_PyInt_AsUnsignedLongLong(PyObject* x);
-static INLINE Py_ssize_t __pyx_PyIndex_AsSsize_t(PyObject* b);
+static INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
-#define __pyx_PyInt_AsLong(x) (PyInt_CheckExact(x) ? PyInt_AS_LONG(x) : PyInt_AsLong(x))
+#if !defined(T_PYSSIZET)
+#if PY_VERSION_HEX < 0x02050000
+#define T_PYSSIZET T_INT
+#elif !defined(T_LONGLONG)
+#define T_PYSSIZET \
+ ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
+ ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
+#else
+#define T_PYSSIZET \
+ ((sizeof(Py_ssize_t) == sizeof(int)) ? T_INT : \
+ ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : \
+ ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
+#endif
+#endif
+
+#if !defined(T_SIZET)
+#if !defined(T_ULONGLONG)
+#define T_SIZET \
+ ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
+#else
+#define T_SIZET \
+ ((sizeof(size_t) == sizeof(unsigned int)) ? T_UINT : \
+ ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : \
+ ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
+#endif
+#endif
+
+static INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+static INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
-static INLINE unsigned char __pyx_PyInt_unsigned_char(PyObject* x);
-static INLINE unsigned short __pyx_PyInt_unsigned_short(PyObject* x);
-static INLINE char __pyx_PyInt_char(PyObject* x);
-static INLINE short __pyx_PyInt_short(PyObject* x);
-static INLINE int __pyx_PyInt_int(PyObject* x);
-static INLINE long __pyx_PyInt_long(PyObject* x);
-static INLINE signed char __pyx_PyInt_signed_char(PyObject* x);
-static INLINE signed short __pyx_PyInt_signed_short(PyObject* x);
-static INLINE signed int __pyx_PyInt_signed_int(PyObject* x);
-static INLINE signed long __pyx_PyInt_signed_long(PyObject* x);
-static INLINE long double __pyx_PyInt_long_double(PyObject* x);
+
#ifdef __GNUC__
/* Test for GCC > 2.95 */
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
@@ -182,6 +229,37 @@
static const char *__pyx_filename;
static const char **__pyx_f;
+
+#ifdef CYTHON_REFNANNY
+typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*NewContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+} __Pyx_RefnannyAPIStruct;
+static __Pyx_RefnannyAPIStruct *__Pyx_Refnanny = NULL;
+#define __Pyx_ImportRefcountAPI(name) (__Pyx_RefnannyAPIStruct *) PyCObject_Import((char *)name, (char *)"RefnannyAPI")
+#define __Pyx_INCREF(r) __Pyx_Refnanny->INCREF(__pyx_refchk, (PyObject *)(r), __LINE__)
+#define __Pyx_DECREF(r) __Pyx_Refnanny->DECREF(__pyx_refchk, (PyObject *)(r), __LINE__)
+#define __Pyx_GOTREF(r) __Pyx_Refnanny->GOTREF(__pyx_refchk, (PyObject *)(r), __LINE__)
+#define __Pyx_GIVEREF(r) __Pyx_Refnanny->GIVEREF(__pyx_refchk, (PyObject *)(r), __LINE__)
+#define __Pyx_XDECREF(r) if((r) == NULL) ; else __Pyx_DECREF(r)
+#define __Pyx_SetupRefcountContext(name) void* __pyx_refchk = __Pyx_Refnanny->NewContext((name), __LINE__, __FILE__)
+#define __Pyx_FinishRefcountContext() __Pyx_Refnanny->FinishContext(&__pyx_refchk)
+#else
+#define __Pyx_INCREF(r) Py_INCREF(r)
+#define __Pyx_DECREF(r) Py_DECREF(r)
+#define __Pyx_GOTREF(r)
+#define __Pyx_GIVEREF(r)
+#define __Pyx_XDECREF(r) Py_XDECREF(r)
+#define __Pyx_SetupRefcountContext(name)
+#define __Pyx_FinishRefcountContext()
+#endif /* CYTHON_REFNANNY */
+#define __Pyx_XGIVEREF(r) if((r) == NULL) ; else __Pyx_GIVEREF(r)
+#define __Pyx_XGOTREF(r) if((r) == NULL) ; else __Pyx_GOTREF(r)
+
static void __Pyx_RaiseDoubleKeywordsError(
const char* func_name, PyObject* kw_name); /*proto*/
@@ -199,6 +277,38 @@
static INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+static INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/
+
+static INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
+
+static INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
+
+static INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
+
+static INLINE char __Pyx_PyInt_AsChar(PyObject *);
+
+static INLINE short __Pyx_PyInt_AsShort(PyObject *);
+
+static INLINE int __Pyx_PyInt_AsInt(PyObject *);
+
+static INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
+
+static INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
+
+static INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
+
+static INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
+
+static INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
+
+static INLINE long __Pyx_PyInt_AsLong(PyObject *);
+
+static INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
+
+static INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
+
+static INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
+
static void __Pyx_AddTraceback(const char *funcname); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
@@ -223,13 +333,16 @@
/* Module declarations from _geod */
static PyTypeObject *__pyx_ptype_5_geod_Geod = 0;
-static PyObject *__pyx_k_12;
-static PyObject *__pyx_k_13;
-static PyObject *__pyx_k_14;
+static PyObject *__pyx_k_12 = 0;
+static PyObject *__pyx_k_13 = 0;
+static PyObject *__pyx_k_14 = 0;
+#define __Pyx_MODULE_NAME "_geod"
+int __pyx_module_is_main__geod = 0;
-
/* Implementation of _geod */
static char __pyx_k_11[] = "1.8.6";
+static char __pyx_k___main__[] = "__main__";
+static PyObject *__pyx_kp___main__;
static char __pyx_k___cinit__[] = "__cinit__";
static PyObject *__pyx_kp___cinit__;
static char __pyx_k___reduce__[] = "__reduce__";
@@ -313,13 +426,14 @@
PyObject *__pyx_v_geodstring = 0;
GEODESIC_T __pyx_v_GEOD_T;
int __pyx_r;
- int __pyx_1;
- PyObject *__pyx_2 = 0;
- PyObject *__pyx_3 = 0;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_geodstring,0};
+ __Pyx_SetupRefcountContext("__cinit__");
if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
PyObject* values[1] = {0};
- Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
case 0: break;
@@ -355,8 +469,10 @@
* self.geodinitstring = PyString_AsString(self.geodstring)
* # initialize projection
*/
- Py_INCREF(__pyx_v_geodstring);
- Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
+ __Pyx_INCREF(__pyx_v_geodstring);
+ __Pyx_GIVEREF(__pyx_v_geodstring);
+ __Pyx_GOTREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
+ __Pyx_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring = __pyx_v_geodstring;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":15
@@ -384,8 +500,8 @@
* raise RuntimeError(pj_strerrno(pj_errno))
* self.proj_version = PJ_VERSION/100.
*/
- __pyx_1 = (pj_errno != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (pj_errno != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":19
* self.geodesic_t = GEOD_init_plus(self.geodinitstring, &GEOD_T)[0]
@@ -394,14 +510,18 @@
* self.proj_version = PJ_VERSION/100.
*
*/
- __pyx_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_2);
- __pyx_2 = 0;
- __pyx_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
- __Pyx_Raise(__pyx_2, 0, 0);
- Py_DECREF(__pyx_2); __pyx_2 = 0;
+ __pyx_t_2 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L6;
}
@@ -414,19 +534,23 @@
*
* def __reduce__(self):
*/
- __pyx_3 = PyFloat_FromDouble((PJ_VERSION / 100.)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version);
- ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version = __pyx_3;
- __pyx_3 = 0;
+ __pyx_t_2 = PyFloat_FromDouble((PJ_VERSION / 100.0)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_GOTREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version);
+ __Pyx_DECREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version);
+ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->proj_version = __pyx_t_2;
+ __pyx_t_2 = 0;
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
- Py_XDECREF(__pyx_2);
- Py_XDECREF(__pyx_3);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("_geod.Geod.__cinit__");
__pyx_r = -1;
__pyx_L0:;
+ __Pyx_FinishRefcountContext();
return __pyx_r;
}
@@ -441,10 +565,11 @@
static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static char __pyx_doc_5_geod_4Geod___reduce__[] = "special method that allows pyproj.Geod instance to be pickled";
static PyObject *__pyx_pf_5_geod_4Geod___reduce__(PyObject *__pyx_v_self, PyObject *unused) {
- PyObject *__pyx_r;
- PyObject *__pyx_1 = 0;
- PyObject *__pyx_2 = 0;
- PyObject *__pyx_3 = 0;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_SetupRefcountContext("__reduce__");
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":24
* def __reduce__(self):
@@ -453,28 +578,37 @@
*
* def _fwd(self, object lons, object lats, object az, object dist, radians=False):
*/
- __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
- PyTuple_SET_ITEM(__pyx_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
- __pyx_3 = PyTuple_New(2); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_1);
- PyTuple_SET_ITEM(__pyx_3, 1, ((PyObject *)__pyx_2));
- __pyx_1 = 0;
- __pyx_2 = 0;
- __pyx_r = ((PyObject *)__pyx_3);
- __pyx_3 = 0;
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_kp___class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+ __Pyx_INCREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
+ __Pyx_GIVEREF(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodstring);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_2));
+ __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_r = ((PyObject *)__pyx_t_3);
+ __pyx_t_3 = 0;
goto __pyx_L0;
- __pyx_r = Py_None; Py_INCREF(Py_None);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- Py_XDECREF(__pyx_1);
- Py_XDECREF(__pyx_2);
- Py_XDECREF(__pyx_3);
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("_geod.Geod.__reduce__");
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_FinishRefcountContext();
return __pyx_r;
}
@@ -508,20 +642,21 @@
void *__pyx_v_latdata;
void *__pyx_v_azdat;
void *__pyx_v_distdat;
- PyObject *__pyx_r;
- int __pyx_1;
- int __pyx_2;
- PyObject *__pyx_3 = 0;
- PyObject *__pyx_4 = 0;
- Py_ssize_t __pyx_5 = 0;
- double __pyx_6;
- int __pyx_7;
- PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_1 = 0;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ double __pyx_t_6;
+ int __pyx_t_7;
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_lons,&__pyx_kp_lats,&__pyx_kp_az,&__pyx_kp_dist,&__pyx_kp_radians,0};
- __pyx_v_radians = __pyx_k_12;
+ __Pyx_SetupRefcountContext("_fwd");
if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
PyObject* values[5] = {0,0,0,0,0};
- Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ values[4] = __pyx_k_12;
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
@@ -554,6 +689,11 @@
else {
__Pyx_RaiseArgtupleInvalid("_fwd", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ case 4:
+ if (kw_args > 1) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_radians);
+ if (unlikely(value)) { values[4] = value; kw_args--; }
+ }
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_fwd") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
@@ -562,10 +702,9 @@
__pyx_v_lats = values[1];
__pyx_v_az = values[2];
__pyx_v_dist = values[3];
- if (values[4]) {
- __pyx_v_radians = values[4];
- }
+ __pyx_v_radians = values[4];
} else {
+ __pyx_v_radians = __pyx_k_12;
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5:
__pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4);
@@ -593,8 +732,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(lats, &latdata, &buflenlats) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":38
* # if buffer api is supported, get pointer to data buffers.
@@ -616,8 +755,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(az, &azdat, &buflenaz) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":40
* raise RuntimeError
@@ -639,8 +778,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(dist, &distdat, &buflend) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_az, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":42
* raise RuntimeError
@@ -662,8 +801,8 @@
* raise RuntimeError
* # process data in buffer
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_dist, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":44
* raise RuntimeError
@@ -685,15 +824,15 @@
* raise RuntimeError("Buffer lengths not the same")
* ndim = buflenlons/_doublesize
*/
- __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats);
- if (__pyx_1) {
- __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz);
- if (__pyx_1) {
- __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
+ __pyx_t_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats);
+ if (__pyx_t_1) {
+ __pyx_t_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz);
+ if (__pyx_t_1) {
+ __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
}
}
- __pyx_2 = (!__pyx_1);
- if (__pyx_2) {
+ __pyx_t_2 = (!__pyx_t_1);
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":47
* # process data in buffer
@@ -702,13 +841,16 @@
* ndim = buflenlons/_doublesize
* lonsdata = <double *>londata
*/
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_INCREF(__pyx_kp_15);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_15);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __Pyx_INCREF(__pyx_kp_15);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_15);
+ __Pyx_GIVEREF(__pyx_kp_15);
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
@@ -721,14 +863,17 @@
* lonsdata = <double *>londata
* latsdata = <double *>latdata
*/
- __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ndim = __pyx_5;
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_ndim = __pyx_t_5;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":49
* raise RuntimeError("Buffer lengths not the same")
@@ -773,7 +918,8 @@
* if radians:
* self.geodesic_t.p1.v = lonsdata[i]
*/
- for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) {
+ __pyx_t_5 = __pyx_v_ndim;
+ for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":54
* distdata = <double *>distdat
@@ -782,8 +928,8 @@
* self.geodesic_t.p1.v = lonsdata[i]
* self.geodesic_t.p1.u = latsdata[i]
*/
- __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__pyx_1) {
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":55
* for i from 0 <= i < ndim:
@@ -831,14 +977,17 @@
* self.geodesic_t.p1.u = _dg2rad*latsdata[i]
* self.geodesic_t.ALPHA12 = _dg2rad*azdata[i]
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":61
* else:
@@ -847,14 +996,17 @@
* self.geodesic_t.ALPHA12 = _dg2rad*azdata[i]
* self.geodesic_t.DIST = distdata[i]
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_4 = PyFloat_FromDouble((__pyx_v_latsdata[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.u = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":62
* self.geodesic_t.p1.v = _dg2rad*lonsdata[i]
@@ -863,14 +1015,17 @@
* self.geodesic_t.DIST = distdata[i]
* geod_pre(&self.geodesic_t)
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = PyFloat_FromDouble((__pyx_v_azdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA12 = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":63
* self.geodesic_t.p1.u = _dg2rad*latsdata[i]
@@ -899,8 +1054,8 @@
* raise RuntimeError(pj_strerrno(pj_errno))
* geod_for(&self.geodesic_t)
*/
- __pyx_2 = (pj_errno != 0);
- if (__pyx_2) {
+ __pyx_t_2 = (pj_errno != 0);
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":66
* geod_pre(&self.geodesic_t)
@@ -909,14 +1064,18 @@
* geod_for(&self.geodesic_t)
* if pj_errno != 0:
*/
- __pyx_3 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyTuple_New(1); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_4, 0, __pyx_3);
- __pyx_3 = 0;
- __pyx_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_4), NULL); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_4)); __pyx_4 = 0;
- __Pyx_Raise(__pyx_3, 0, 0);
- Py_DECREF(__pyx_3); __pyx_3 = 0;
+ __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L14;
}
@@ -938,8 +1097,8 @@
* raise RuntimeError(pj_strerrno(pj_errno))
* if isnan(self.geodesic_t.ALPHA21):
*/
- __pyx_1 = (pj_errno != 0);
- if (__pyx_1) {
+ __pyx_t_2 = (pj_errno != 0);
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":69
* geod_for(&self.geodesic_t)
@@ -948,14 +1107,18 @@
* if isnan(self.geodesic_t.ALPHA21):
* raise ValueError('undefined forward geodesic (may be an equatorial arc)')
*/
- __pyx_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_4);
- __pyx_4 = 0;
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
+ __pyx_t_4 = __Pyx_PyBytes_FromString(pj_strerrno(pj_errno)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L15;
}
@@ -968,8 +1131,8 @@
* raise ValueError('undefined forward geodesic (may be an equatorial arc)')
* if radians:
*/
- __pyx_7 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21);
- if (__pyx_7) {
+ __pyx_t_7 = isnan(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21);
+ if (__pyx_t_7) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":71
* raise RuntimeError(pj_strerrno(pj_errno))
@@ -978,13 +1141,16 @@
* if radians:
* lonsdata[i] = self.geodesic_t.p2.v
*/
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_INCREF(__pyx_kp_16);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_16);
- __pyx_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_4));
+ __Pyx_INCREF(__pyx_kp_16);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_16);
+ __Pyx_GIVEREF(__pyx_kp_16);
+ __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L16;
}
@@ -997,8 +1163,8 @@
* lonsdata[i] = self.geodesic_t.p2.v
* latsdata[i] = self.geodesic_t.p2.u
*/
- __pyx_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__pyx_2) {
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":73
* raise ValueError('undefined forward geodesic (may be an equatorial arc)')
@@ -1037,14 +1203,17 @@
* latsdata[i] = _rad2dg*self.geodesic_t.p2.u
* azdata[i] = _rad2dg*self.geodesic_t.ALPHA21
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ (__pyx_v_lonsdata[__pyx_v_i]) = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":78
* else:
@@ -1053,14 +1222,17 @@
* azdata[i] = _rad2dg*self.geodesic_t.ALPHA21
*
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- (__pyx_v_latsdata[__pyx_v_i]) = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p2.u); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ (__pyx_v_latsdata[__pyx_v_i]) = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":79
* lonsdata[i] = _rad2dg*self.geodesic_t.p2.v
@@ -1069,26 +1241,32 @@
*
* def _inv(self, object lons1, object lats1, object lons2, object lats2, radians=False):
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- (__pyx_v_azdata[__pyx_v_i]) = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_10); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = PyFloat_FromDouble(((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.ALPHA21); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ (__pyx_v_azdata[__pyx_v_i]) = __pyx_t_6;
}
__pyx_L17:;
}
- __pyx_r = Py_None; Py_INCREF(Py_None);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto __pyx_L0;
__pyx_L1_error:;
- Py_XDECREF(__pyx_3);
- Py_XDECREF(__pyx_4);
+ __Pyx_XDECREF(__pyx_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
__Pyx_AddTraceback("_geod.Geod._fwd");
__pyx_r = NULL;
__pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_FinishRefcountContext();
return __pyx_r;
}
@@ -1122,20 +1300,21 @@
void *__pyx_v_latdata;
void *__pyx_v_azdat;
void *__pyx_v_distdat;
- PyObject *__pyx_r;
- int __pyx_1;
- int __pyx_2;
- PyObject *__pyx_3 = 0;
- PyObject *__pyx_4 = 0;
- Py_ssize_t __pyx_5 = 0;
- double __pyx_6;
- int __pyx_7;
- PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_1 = 0;
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ double __pyx_t_6;
+ int __pyx_t_7;
static PyObject **__pyx_pyargnames[] = {&__pyx_kp_1,&__pyx_kp_2,&__pyx_kp_3,&__pyx_kp_4,&__pyx_kp_radians,0};
- __pyx_v_radians = __pyx_k_13;
+ __Pyx_SetupRefcountContext("_inv");
if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
PyObject* values[5] = {0,0,0,0,0};
- Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
+ values[4] = __pyx_k_13;
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
@@ -1168,6 +1347,11 @@
else {
__Pyx_RaiseArgtupleInvalid("_inv", 0, 4, 5, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
+ case 4:
+ if (kw_args > 1) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_kp_radians);
+ if (unlikely(value)) { values[4] = value; kw_args--; }
+ }
}
if (unlikely(kw_args > 0)) {
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_inv") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
@@ -1176,10 +1360,9 @@
__pyx_v_lats1 = values[1];
__pyx_v_lons2 = values[2];
__pyx_v_lats2 = values[3];
- if (values[4]) {
- __pyx_v_radians = values[4];
- }
+ __pyx_v_radians = values[4];
} else {
+ __pyx_v_radians = __pyx_k_13;
switch (PyTuple_GET_SIZE(__pyx_args)) {
case 5:
__pyx_v_radians = PyTuple_GET_ITEM(__pyx_args, 4);
@@ -1207,8 +1390,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(lats1, &latdata, &buflenlats) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons1, (&__pyx_v_londata), (&__pyx_v_buflenlons)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":92
* # if buffer api is supported, get pointer to data buffers.
@@ -1230,8 +1413,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(lons2, &azdat, &buflenaz) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats1, (&__pyx_v_latdata), (&__pyx_v_buflenlats)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":94
* raise RuntimeError
@@ -1253,8 +1436,8 @@
* raise RuntimeError
* if PyObject_AsWriteBuffer(lats2, &distdat, &buflend) <> 0:
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lons2, (&__pyx_v_azdat), (&__pyx_v_buflenaz)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":96
* raise RuntimeError
@@ -1276,8 +1459,8 @@
* raise RuntimeError
* # process data in buffer
*/
- __pyx_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
- if (__pyx_1) {
+ __pyx_t_1 = (PyObject_AsWriteBuffer(__pyx_v_lats2, (&__pyx_v_distdat), (&__pyx_v_buflend)) != 0);
+ if (__pyx_t_1) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":98
* raise RuntimeError
@@ -1299,15 +1482,15 @@
* raise RuntimeError("Buffer lengths not the same")
* ndim = buflenlons/_doublesize
*/
- __pyx_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats);
- if (__pyx_1) {
- __pyx_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz);
- if (__pyx_1) {
- __pyx_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
+ __pyx_t_1 = (__pyx_v_buflenlons == __pyx_v_buflenlats);
+ if (__pyx_t_1) {
+ __pyx_t_1 = (__pyx_v_buflenlats == __pyx_v_buflenaz);
+ if (__pyx_t_1) {
+ __pyx_t_1 = (__pyx_v_buflenaz == __pyx_v_buflend);
}
}
- __pyx_2 = (!__pyx_1);
- if (__pyx_2) {
+ __pyx_t_2 = (!__pyx_t_1);
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":101
* # process data in buffer
@@ -1316,13 +1499,16 @@
* ndim = buflenlons/_doublesize
* lonsdata = <double *>londata
*/
- __pyx_3 = PyTuple_New(1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_INCREF(__pyx_kp_17);
- PyTuple_SET_ITEM(__pyx_3, 0, __pyx_kp_17);
- __pyx_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_3), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
- __Pyx_Raise(__pyx_4, 0, 0);
- Py_DECREF(__pyx_4); __pyx_4 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(((PyObject *)__pyx_t_3));
+ __Pyx_INCREF(__pyx_kp_17);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_17);
+ __Pyx_GIVEREF(__pyx_kp_17);
+ __pyx_t_4 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
{__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
goto __pyx_L10;
}
@@ -1335,14 +1521,17 @@
* lonsdata = <double *>londata
* latsdata = <double *>latdata
*/
- __pyx_3 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_5 = __pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_v_ndim = __pyx_5;
+ __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_buflenlons); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp__doublesize); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_ndim = __pyx_t_5;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":103
* raise RuntimeError("Buffer lengths not the same")
@@ -1387,7 +1576,8 @@
* if radians:
* self.geodesic_t.p1.v = lonsdata[i]
*/
- for (__pyx_v_i = 0; __pyx_v_i < __pyx_v_ndim; __pyx_v_i++) {
+ __pyx_t_5 = __pyx_v_ndim;
+ for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":108
* distdata = <double *>distdat
@@ -1396,8 +1586,8 @@
* self.geodesic_t.p1.v = lonsdata[i]
* self.geodesic_t.p1.u = latsdata[i]
*/
- __pyx_1 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- if (__pyx_1) {
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_radians); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (__pyx_t_2) {
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":109
* for i from 0 <= i < ndim:
@@ -1445,14 +1635,17 @@
* self.geodesic_t.p1.u = _dg2rad*latsdata[i]
* self.geodesic_t.p2.v = _dg2rad*azdata[i]
*/
- __pyx_3 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_1 = PyNumber_Multiply(__pyx_3, __pyx_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_3); __pyx_3 = 0;
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- __pyx_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_6;
+ __pyx_1 = __Pyx_GetName(__pyx_m, __pyx_kp_9); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_1);
+ __pyx_t_3 = PyFloat_FromDouble((__pyx_v_lonsdata[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Multiply(__pyx_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_1); __pyx_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ ((struct __pyx_obj_5_geod_Geod *)__pyx_v_self)->geodesic_t.p1.v = __pyx_t_6;
/* "/Volumes/User/jwhitaker/matplotlib/basemap/src/_geod.pyx":115
* else:
@@ -1461,14 +1654,17 @@
* ...
[truncated message content] |
|
From: <jd...@us...> - 2009-08-05 15:44:06
|
Revision: 7375
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7375&view=rev
Author: jdh2358
Date: 2009-08-05 15:43:54 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
move demo image into axes_grid package so examples will run from anywhere
Modified Paths:
--------------
trunk/matplotlib/examples/axes_grid/demo_axes_divider.py
trunk/matplotlib/examples/axes_grid/demo_axes_grid.py
trunk/matplotlib/examples/axes_grid/inset_locator_demo2.py
trunk/matplotlib/examples/axes_grid/simple_axesgrid2.py
trunk/matplotlib/examples/axes_grid/simple_rgb.py
Added Paths:
-----------
trunk/matplotlib/lib/mpl_toolkits/axes_grid/demo_image.py
Removed Paths:
-------------
trunk/matplotlib/examples/axes_grid/demo_image.py
Modified: trunk/matplotlib/examples/axes_grid/demo_axes_divider.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_divider.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_divider.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -1,5 +1,5 @@
import matplotlib.pyplot as plt
-from demo_image import get_demo_image
+from mpl_toolkits.axes_grid.demo_image import get_demo_image
#import mpl_toolkits.imaging.axes_grid as imaging
def demo_simple_image(ax):
Modified: trunk/matplotlib/examples/axes_grid/demo_axes_grid.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_axes_grid.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/demo_axes_grid.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -1,5 +1,5 @@
import matplotlib.pyplot as plt
-from demo_image import get_demo_image
+from mpl_toolkits.axes_grid.demo_image import get_demo_image
from mpl_toolkits.axes_grid import AxesGrid
Deleted: trunk/matplotlib/examples/axes_grid/demo_image.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/demo_image.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/demo_image.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -1,17 +0,0 @@
-import numpy as np
-
-def get_demo_image():
- # prepare image
- delta = 0.5
-
- extent = (-3,4,-4,3)
- x = np.arange(-3.0, 4.001, delta)
- y = np.arange(-4.0, 3.001, delta)
- X, Y = np.meshgrid(x, y)
- import matplotlib.mlab as mlab
- Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
- Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
- Z = (Z1 - Z2) * 10
-
- return Z, extent
-
Modified: trunk/matplotlib/examples/axes_grid/inset_locator_demo2.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/inset_locator_demo2.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/inset_locator_demo2.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -5,7 +5,7 @@
import numpy as np
-from demo_image import get_demo_image
+from mpl_toolkits.axes_grid.demo_image import get_demo_image
fig = plt.figure(1, [5,4])
Modified: trunk/matplotlib/examples/axes_grid/simple_axesgrid2.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/simple_axesgrid2.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/simple_axesgrid2.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -1,6 +1,6 @@
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid import AxesGrid
-from demo_image import get_demo_image
+from mpl_toolkits.axes_grid.demo_image import get_demo_image
F = plt.figure(1, (5.5, 3.5))
grid = AxesGrid(F, 111, # similar to subplot(111)
Modified: trunk/matplotlib/examples/axes_grid/simple_rgb.py
===================================================================
--- trunk/matplotlib/examples/axes_grid/simple_rgb.py 2009-08-05 15:40:22 UTC (rev 7374)
+++ trunk/matplotlib/examples/axes_grid/simple_rgb.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -1,6 +1,6 @@
import matplotlib.pyplot as plt
-from demo_image import get_demo_image
+from mpl_toolkits.axes_grid.demo_image import get_demo_image
from mpl_toolkits.axes_grid.axes_rgb import RGBAxes
def get_rgb():
Added: trunk/matplotlib/lib/mpl_toolkits/axes_grid/demo_image.py
===================================================================
--- trunk/matplotlib/lib/mpl_toolkits/axes_grid/demo_image.py (rev 0)
+++ trunk/matplotlib/lib/mpl_toolkits/axes_grid/demo_image.py 2009-08-05 15:43:54 UTC (rev 7375)
@@ -0,0 +1,17 @@
+import numpy as np
+
+def get_demo_image():
+ # prepare image
+ delta = 0.5
+
+ extent = (-3,4,-4,3)
+ x = np.arange(-3.0, 4.001, delta)
+ y = np.arange(-4.0, 3.001, delta)
+ X, Y = np.meshgrid(x, y)
+ import matplotlib.mlab as mlab
+ Z1 = mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
+ Z2 = mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
+ Z = (Z1 - Z2) * 10
+
+ return Z, extent
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2009-08-05 15:40:32
|
Revision: 7374
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7374&view=rev
Author: mdboom
Date: 2009-08-05 15:40:22 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Fix mathtex-inside-of-matplotlib install (need to explicitly include mathtex.backends package)
Modified Paths:
--------------
branches/mathtex/setup.py
Modified: branches/mathtex/setup.py
===================================================================
--- branches/mathtex/setup.py 2009-08-05 15:37:08 UTC (rev 7373)
+++ branches/mathtex/setup.py 2009-08-05 15:40:22 UTC (rev 7374)
@@ -219,7 +219,7 @@
# Add installation of mathtex
if not check_for_mathtex():
package_dir['mathtex'] = 'lib/mathtex/mathtex'
- packages.append('mathtex')
+ packages.extend(['mathtex', 'mathtex.backends'])
print_raw("")
print_raw("OPTIONAL USETEX DEPENDENCIES")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:37:15
|
Revision: 7373
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7373&view=rev
Author: jdh2358
Date: 2009-08-05 15:37:08 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
make all-in-one sample data server class cbook.ViewVCCachedServer so it can be reused by other projects
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-08-05 15:26:30 UTC (rev 7372)
+++ trunk/matplotlib/CHANGELOG 2009-08-05 15:37:08 UTC (rev 7373)
@@ -1,4 +1,5 @@
-2009-08-04 Made cbook.get_mpl_data make use of the ETag and Last-Modified
+
+2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified
headers of mod_dav_svn. - JKS
2009-08-03 Add PathCollection; modify contourf to use complex
@@ -6,9 +7,9 @@
2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS
-2009-07-31 Added cbook.get_mpl_data for urllib enabled fetching and
+2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and
cacheing of data needed for examples. See
- examples/misc/mpl_data_demo.py - JDH
+ examples/misc/sample_data_demo.py - JDH
======================================================================
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:26:30 UTC (rev 7372)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:37:08 UTC (rev 7373)
@@ -344,7 +344,7 @@
def is_scalar_or_string(val):
return is_string_like(val) or not iterable(val)
-class _CacheProcessor(urllib2.BaseHandler):
+class ViewVCCachedServer(urllib2.BaseHandler):
"""
Urllib2 handler that takes care of caching files.
The file cache.pck holds the directory of files to be cached.
@@ -354,6 +354,7 @@
self.baseurl = baseurl
self.read_cache()
self.remove_stale_files()
+ self.opener = urllib2.build_opener(self)
def in_cache_dir(self, fn):
# make sure the datadir exists
@@ -394,7 +395,7 @@
if path not in listed and path != 'cache.pck':
thisfile = os.path.join(self.cache_dir, path)
if not os.path.isdir(thisfile):
- matplotlib.verbose.report('_CacheProcessor:remove_stale_files: removing %s'%thisfile,
+ matplotlib.verbose.report('ViewVCCachedServer:remove_stale_files: removing %s'%thisfile,
level='debug')
os.remove(thisfile)
@@ -451,7 +452,7 @@
url = req.get_full_url()
fn, _, _ = self.cache[url]
cachefile = self.in_cache_dir(fn)
- matplotlib.verbose.report('_CacheProcessor: reading data file from cache file "%s"'%cachefile)
+ matplotlib.verbose.report('ViewVCCachedServer: reading data file from cache file "%s"'%cachefile)
file = open(cachefile, 'rb')
handle = urllib2.addinfourl(file, hdrs, url)
handle.code = 304
@@ -473,9 +474,41 @@
result.msg = response.msg
return result
+ def get_sample_data(self, fname, asfileobj=True):
+ """
+ Check the cachedirectory for a sample_data file. If it does
+ not exist, fetch it with urllib from the svn repo and
+ store it in the cachedir.
+
+ If asfileobj is True, a file object will be returned. Else the
+ path to the file as a string will be returned
+
+ """
+
+
+ # quote is not in python2.4, so check for it and get it from
+ # urllib if it is not available
+ quote = getattr(urllib2, 'quote', None)
+ if quote is None:
+ import urllib
+ quote = urllib.quote
+
+ url = self.baseurl + quote(fname)
+ response = self.opener.open(url)
+
+
+ relpath = self.cache[url][0]
+ fname = self.in_cache_dir(relpath)
+
+ if asfileobj:
+ return file(fname)
+ else:
+ return fname
+
+
def get_sample_data(fname, asfileobj=True):
"""
- Check the cachedirectory ~/.matplotlib/sample_data for an sample_data
+ Check the cachedirectory ~/.matplotlib/sample_data for a sample_data
file. If it does not exist, fetch it with urllib from the mpl svn repo
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/
@@ -488,42 +521,22 @@
To add a datafile to this directory, you need to check out
sample_data from matplotlib svn::
- svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
+ svn co http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data
and svn add the data file you want to support. This is primarily
intended for use in mpl examples that need custom data
"""
- baseurl ='http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/'
- if not hasattr(get_sample_data, 'opener'):
+ myserver = get_sample_data.myserver
+ if myserver is None:
configdir = matplotlib.get_configdir()
cachedir = os.path.join(configdir, 'sample_data')
- if not os.path.exists(cachedir):
- os.mkdir(cachedir)
- # Store the cache processor and url opener as attributes of this function
- get_sample_data.processor = _CacheProcessor(cachedir, baseurl)
- get_sample_data.opener = urllib2.build_opener(get_sample_data.processor)
+ baseurl = 'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/'
+ myserver = get_sample_data.myserver = ViewVCCachedServer(cachedir, baseurl)
+ return myserver.get_sample_data(fname, asfileobj=asfileobj)
- # quote is not in python2.4, so check for it and get it from
- # urllib if it is not available
- quote = getattr(urllib2, 'quote', None)
- if quote is None:
- import urllib
- quote = urllib.quote
-
- url = baseurl + quote(fname)
- response = get_sample_data.opener.open(url)
-
- p = get_sample_data.processor
- relpath = p.cache[url][0]
- fname = p.in_cache_dir(relpath)
-
- if asfileobj:
- return file(fname)
- else:
- return fname
-
+get_sample_data.myserver = None
def flatten(seq, scalarp=is_scalar_or_string):
"""
this generator flattens nested containers such as
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <evi...@us...> - 2009-08-05 15:26:38
|
Revision: 7372
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7372&view=rev
Author: evilguru
Date: 2009-08-05 15:26:30 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Enable caching for mathtex expressions. This delivers a big performance boost when panning/zooming.
Modified Paths:
--------------
branches/mathtex/lib/matplotlib/backends/backend_agg.py
branches/mathtex/lib/matplotlib/backends/backend_cairo.py
branches/mathtex/lib/matplotlib/backends/backend_gdk.py
branches/mathtex/lib/matplotlib/backends/backend_macosx.py
branches/mathtex/lib/matplotlib/backends/backend_pdf.py
branches/mathtex/lib/matplotlib/backends/backend_ps.py
Modified: branches/mathtex/lib/matplotlib/backends/backend_agg.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_agg.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_agg.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -111,7 +111,7 @@
'debug-annoying')
if HAVE_MATHTEX:
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- self.dpi, rcParams['mathtext.default'])
+ self.dpi, rcParams['mathtext.default'], cache=True)
b = MathtexBackendImage()
m.render_to_backend(b)
@@ -166,7 +166,7 @@
return 0.0, 0.0, 0.0
else:
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- self.dpi, rcParams['mathtext.default'])
+ self.dpi, rcParams['mathtext.default'], cache=True)
return m.width, m.height, m.depth
font = self._get_agg_font(prop)
font.set_text(s, 0.0, flags=LOAD_FORCE_AUTOHINT) # the width and height of unrotated string
Modified: branches/mathtex/lib/matplotlib/backends/backend_cairo.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_cairo.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_cairo.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -211,7 +211,7 @@
ctx = gc.ctx
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- self.dpi, rcParams['mathtext.default'])
+ self.dpi, rcParams['mathtext.default'], cache=True)
b = MathtexBackendCairo()
m.render_to_backend(b)
@@ -242,7 +242,7 @@
if ismath:
if HAVE_MATHTEX:
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- self.dpi, rcParams['mathtext.default'])
+ self.dpi, rcParams['mathtext.default'], cache=True)
return m.width, m.height, m.depth
else:
warnings.warn('matplotlib was compiled without mathtex support. ' +
Modified: branches/mathtex/lib/matplotlib/backends/backend_gdk.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_gdk.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_gdk.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -167,7 +167,8 @@
return
m = Mathtex(s, matplotlib.rcParams['mathtext.fontset'],
- prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'])
+ prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'],
+ cache=True)
b = MathtexBackendImage()
m.render_to_backend(b)
@@ -318,7 +319,8 @@
return 0.0, 0.0, 0.0
else:
m = Mathtex(s, matplotlib.rcParams['mathtext.fontset'],
- prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'])
+ prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'],
+ cache=True)
return m.width, m.height, m.depth
layout, inkRect, logicalRect = self._get_pango_layout(s, prop)
Modified: branches/mathtex/lib/matplotlib/backends/backend_macosx.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_macosx.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_macosx.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -98,7 +98,7 @@
return
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- self.dpi, rcParams['mathtext.default'])
+ self.dpi, rcParams['mathtext.default'], cache=True)
b = MathtexBackendImage()
m.render_to_backend(b)
@@ -126,7 +126,8 @@
if ismath:
if HAVE_MATHTEX:
m = Mathtex(s, rcParams['mathtext.fontset'],
- prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'])
+ prop.get_size_in_points(), self.dpi, rcParams['mathtext.default'],
+ cache=True)
return m.width, m.height, m.depth
else:
warnings.warn('matplotlib was compiled without mathtex support. ' +
Modified: branches/mathtex/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_pdf.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_pdf.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -1352,7 +1352,7 @@
return
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- 72.0, rcParams['mathtext.default'])
+ 72.0, rcParams['mathtext.default'], cache=True)
# Generate the dict of used characters
used_characters = {}
@@ -1669,7 +1669,8 @@
w, h, d = 0.0, 0.0, 0.0
else:
m = Mathtex(s, rcParams['mathtext.fontset'],
- prop.get_size_in_points(), 72.0, rcParams['mathtext.default'])
+ prop.get_size_in_points(), 72.0, rcParams['mathtext.default'],
+ cache=True)
w, h, d = m.width, m.height, m.depth
elif rcParams['pdf.use14corefonts']:
Modified: branches/mathtex/lib/matplotlib/backends/backend_ps.py
===================================================================
--- branches/mathtex/lib/matplotlib/backends/backend_ps.py 2009-08-05 15:14:35 UTC (rev 7371)
+++ branches/mathtex/lib/matplotlib/backends/backend_ps.py 2009-08-05 15:26:30 UTC (rev 7372)
@@ -283,7 +283,7 @@
if ismath:
if HAVE_MATHTEX:
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- 72.0, rcParams['mathtext.default'])
+ 72.0, rcParams['mathtext.default'], cache=True)
return m.width, m.height, m.depth
else:
warnings.warn('matplotlib was compiled without mathtex support. ' +
@@ -752,7 +752,7 @@
return
m = Mathtex(s, rcParams['mathtext.fontset'], prop.get_size_in_points(),
- 72.0, rcParams['mathtext.default'])
+ 72.0, rcParams['mathtext.default'], cache=True)
# Generate the dict of used characters
used_characters = {}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:14:44
|
Revision: 7371
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7371&view=rev
Author: jdh2358
Date: 2009-08-05 15:14:35 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
use proper file handle to the sample data
Modified Paths:
--------------
trunk/matplotlib/examples/misc/sample_data_test.py
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/examples/misc/sample_data_test.py
===================================================================
--- trunk/matplotlib/examples/misc/sample_data_test.py 2009-08-05 15:07:41 UTC (rev 7370)
+++ trunk/matplotlib/examples/misc/sample_data_test.py 2009-08-05 15:14:35 UTC (rev 7371)
@@ -8,6 +8,19 @@
svn version will be cached in ~/.matplotlib/sample_data)
"""
+import matplotlib.mlab as mlab
import matplotlib.cbook as cbook
-fh = cbook.get_sample_data('testdir/subdir/testsub.csv')
+
+# get the file handle to the cached data and print the contents
+datafile = 'testdir/subdir/testsub.csv'
+fh = cbook.get_sample_data(datafile)
print fh.read()
+
+# make sure we can read it using csv2rec
+fh.seek(0)
+r = mlab.csv2rec(fh)
+
+print mlab.rec2txt(r)
+
+fh.close()
+
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:07:41 UTC (rev 7370)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:14:35 UTC (rev 7371)
@@ -418,8 +418,8 @@
#while os.path.exists(self.in_cache_dir(fn)):
# fn = rightmost + '.' + str(random.randint(0,9999999))
-
-
+
+
f = open(self.in_cache_dir(fn), 'wb')
f.write(data)
f.close()
@@ -514,12 +514,15 @@
url = baseurl + quote(fname)
response = get_sample_data.opener.open(url)
+
+ p = get_sample_data.processor
+ relpath = p.cache[url][0]
+ fname = p.in_cache_dir(relpath)
+
if asfileobj:
- return response
+ return file(fname)
else:
- response.close()
- p = get_sample_data.processor
- return p.in_cache_dir(p.cache[url][0])
+ return fname
def flatten(seq, scalarp=is_scalar_or_string):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:07:48
|
Revision: 7370
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7370&view=rev
Author: jdh2358
Date: 2009-08-05 15:07:41 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
add support for nested dirs in sample_data
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:02:12 UTC (rev 7369)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:07:41 UTC (rev 7370)
@@ -356,8 +356,14 @@
self.remove_stale_files()
def in_cache_dir(self, fn):
- return os.path.join(self.cache_dir, fn)
+ # make sure the datadir exists
+ reldir, filename = os.path.split(fn)
+ datadir = os.path.join(self.cache_dir, reldir)
+ if not os.path.exists(datadir):
+ os.makedirs(datadir)
+ return os.path.join(datadir, filename)
+
def read_cache(self):
"""
Read the cache file from the cache directory.
@@ -386,7 +392,11 @@
listed = set([fn for (_, (fn, _, _)) in self.cache.items()])
for path in os.listdir(self.cache_dir):
if path not in listed and path != 'cache.pck':
- os.remove(os.path.join(self.cache_dir, path))
+ thisfile = os.path.join(self.cache_dir, path)
+ if not os.path.isdir(thisfile):
+ matplotlib.verbose.report('_CacheProcessor:remove_stale_files: removing %s'%thisfile,
+ level='debug')
+ os.remove(thisfile)
def write_cache(self):
"""
@@ -402,12 +412,14 @@
Store a received file in the cache directory.
"""
# Pick a filename
- rightmost = url.rstrip('/').split('/')[-1]
- fn = rightmost
- while os.path.exists(self.in_cache_dir(fn)):
- fn = rightmost + '.' + str(random.randint(0,9999999))
+ fn = url[len(self.baseurl):]
+ fullpath = self.in_cache_dir(fn)
- # Write out the data
+ #while os.path.exists(self.in_cache_dir(fn)):
+ # fn = rightmost + '.' + str(random.randint(0,9999999))
+
+
+
f = open(self.in_cache_dir(fn), 'wb')
f.write(data)
f.close()
@@ -438,7 +450,9 @@
"""
url = req.get_full_url()
fn, _, _ = self.cache[url]
- file = open(self.in_cache_dir(fn), 'rb')
+ cachefile = self.in_cache_dir(fn)
+ matplotlib.verbose.report('_CacheProcessor: reading data file from cache file "%s"'%cachefile)
+ file = open(cachefile, 'rb')
handle = urllib2.addinfourl(file, hdrs, url)
handle.code = 304
return handle
@@ -480,13 +494,14 @@
intended for use in mpl examples that need custom data
"""
+ baseurl ='http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/'
if not hasattr(get_sample_data, 'opener'):
configdir = matplotlib.get_configdir()
cachedir = os.path.join(configdir, 'sample_data')
if not os.path.exists(cachedir):
os.mkdir(cachedir)
# Store the cache processor and url opener as attributes of this function
- get_sample_data.processor = _CacheProcessor(cachedir)
+ get_sample_data.processor = _CacheProcessor(cachedir, baseurl)
get_sample_data.opener = urllib2.build_opener(get_sample_data.processor)
@@ -497,8 +512,7 @@
import urllib
quote = urllib.quote
- url = 'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/' + \
- quote(fname)
+ url = baseurl + quote(fname)
response = get_sample_data.opener.open(url)
if asfileobj:
return response
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 15:02:20
|
Revision: 7369
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7369&view=rev
Author: jdh2358
Date: 2009-08-05 15:02:12 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
add support for nested dirs in sample_data
Modified Paths:
--------------
trunk/matplotlib/examples/misc/sample_data_test.py
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/examples/misc/sample_data_test.py
===================================================================
--- trunk/matplotlib/examples/misc/sample_data_test.py 2009-08-05 14:54:01 UTC (rev 7368)
+++ trunk/matplotlib/examples/misc/sample_data_test.py 2009-08-05 15:02:12 UTC (rev 7369)
@@ -9,5 +9,5 @@
"""
import matplotlib.cbook as cbook
-fh = cbook.get_sample_data("testdata.csv")
+fh = cbook.get_sample_data('testdir/subdir/testsub.csv')
print fh.read()
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 14:54:01 UTC (rev 7368)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 15:02:12 UTC (rev 7369)
@@ -349,8 +349,9 @@
Urllib2 handler that takes care of caching files.
The file cache.pck holds the directory of files to be cached.
"""
- def __init__(self, cache_dir):
+ def __init__(self, cache_dir, baseurl):
self.cache_dir = cache_dir
+ self.baseurl = baseurl
self.read_cache()
self.remove_stale_files()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:54:08
|
Revision: 7368
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7368&view=rev
Author: jdh2358
Date: 2009-08-05 14:54:01 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
make a nested subdir for testing
Added Paths:
-----------
trunk/sample_data/testdir/
trunk/sample_data/testdir/subdir/
trunk/sample_data/testdir/subdir/testsub.csv
Added: trunk/sample_data/testdir/subdir/testsub.csv
===================================================================
--- trunk/sample_data/testdir/subdir/testsub.csv (rev 0)
+++ trunk/sample_data/testdir/subdir/testsub.csv 2009-08-05 14:54:01 UTC (rev 7368)
@@ -0,0 +1,5 @@
+name,age
+john,41
+miriam,38
+rahel,11
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:44:26
|
Revision: 7367
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7367&view=rev
Author: jdh2358
Date: 2009-08-05 14:44:18 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
make urllib quote python2.4 compliant
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 14:39:36 UTC (rev 7366)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 14:44:18 UTC (rev 7367)
@@ -488,8 +488,16 @@
get_sample_data.processor = _CacheProcessor(cachedir)
get_sample_data.opener = urllib2.build_opener(get_sample_data.processor)
+
+ # quote is not in python2.4, so check for it and get it from
+ # urllib if it is not available
+ quote = getattr(urllib2, 'quote', None)
+ if quote is None:
+ import urllib
+ quote = urllib.quote
+
url = 'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/' + \
- urllib2.quote(fname)
+ quote(fname)
response = get_sample_data.opener.open(url)
if asfileobj:
return response
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:39:49
|
Revision: 7366
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7366&view=rev
Author: jdh2358
Date: 2009-08-05 14:39:36 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
rename mpl_data to sample_data to avoid ambiguity with lib/matplotlib/mpl-data
Added Paths:
-----------
trunk/matplotlib/examples/misc/sample_data_demo.py
trunk/matplotlib/examples/misc/sample_data_test.py
Removed Paths:
-------------
trunk/matplotlib/examples/misc/mpl_data_demo.py
trunk/matplotlib/examples/misc/mpl_data_test.py
Deleted: trunk/matplotlib/examples/misc/mpl_data_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/mpl_data_demo.py 2009-08-05 14:38:44 UTC (rev 7365)
+++ trunk/matplotlib/examples/misc/mpl_data_demo.py 2009-08-05 14:39:36 UTC (rev 7366)
@@ -1,12 +0,0 @@
-"""
-Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else
-fetch it from svn and cache it
-"""
-import matplotlib.cbook as cbook
-import matplotlib.pyplot as plt
-fname = cbook.get_sample_data('lena.png', asfileobj=False)
-
-print 'fname', fname
-im = plt.imread(fname)
-plt.imshow(im)
-plt.show()
Deleted: trunk/matplotlib/examples/misc/mpl_data_test.py
===================================================================
--- trunk/matplotlib/examples/misc/mpl_data_test.py 2009-08-05 14:38:44 UTC (rev 7365)
+++ trunk/matplotlib/examples/misc/mpl_data_test.py 2009-08-05 14:39:36 UTC (rev 7366)
@@ -1,13 +0,0 @@
-"""
-Demonstrate how get_sample_data works with svn revisions in the data.
-
- svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
-
-and edit testdata.csv to add a new row. After committing the changes,
-when you rerun this script you will get the updated data (and the new
-svn version will be cached in ~/.matplotlib/sample_data)
-"""
-
-import matplotlib.cbook as cbook
-fh = cbook.get_sample_data("testdata.csv")
-print fh.read()
Copied: trunk/matplotlib/examples/misc/sample_data_demo.py (from rev 7365, trunk/matplotlib/examples/misc/mpl_data_demo.py)
===================================================================
--- trunk/matplotlib/examples/misc/sample_data_demo.py (rev 0)
+++ trunk/matplotlib/examples/misc/sample_data_demo.py 2009-08-05 14:39:36 UTC (rev 7366)
@@ -0,0 +1,12 @@
+"""
+Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else
+fetch it from svn and cache it
+"""
+import matplotlib.cbook as cbook
+import matplotlib.pyplot as plt
+fname = cbook.get_sample_data('lena.png', asfileobj=False)
+
+print 'fname', fname
+im = plt.imread(fname)
+plt.imshow(im)
+plt.show()
Copied: trunk/matplotlib/examples/misc/sample_data_test.py (from rev 7365, trunk/matplotlib/examples/misc/mpl_data_test.py)
===================================================================
--- trunk/matplotlib/examples/misc/sample_data_test.py (rev 0)
+++ trunk/matplotlib/examples/misc/sample_data_test.py 2009-08-05 14:39:36 UTC (rev 7366)
@@ -0,0 +1,13 @@
+"""
+Demonstrate how get_sample_data works with svn revisions in the data.
+
+ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
+
+and edit testdata.csv to add a new row. After committing the changes,
+when you rerun this script you will get the updated data (and the new
+svn version will be cached in ~/.matplotlib/sample_data)
+"""
+
+import matplotlib.cbook as cbook
+fh = cbook.get_sample_data("testdata.csv")
+print fh.read()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:38:54
|
Revision: 7365
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7365&view=rev
Author: jdh2358
Date: 2009-08-05 14:38:44 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
rename mpl_data to sample_data to avoid ambiguity with lib/matplotlib/mpl-data
Modified Paths:
--------------
trunk/matplotlib/examples/misc/mpl_data_demo.py
trunk/matplotlib/examples/misc/mpl_data_test.py
trunk/matplotlib/lib/matplotlib/cbook.py
Modified: trunk/matplotlib/examples/misc/mpl_data_demo.py
===================================================================
--- trunk/matplotlib/examples/misc/mpl_data_demo.py 2009-08-05 14:36:27 UTC (rev 7364)
+++ trunk/matplotlib/examples/misc/mpl_data_demo.py 2009-08-05 14:38:44 UTC (rev 7365)
@@ -1,10 +1,10 @@
"""
-Grab mpl data from the ~/.matplotlib/mpl_data cache if it exists, else
+Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else
fetch it from svn and cache it
"""
import matplotlib.cbook as cbook
import matplotlib.pyplot as plt
-fname = cbook.get_mpl_data('lena.png', asfileobj=False)
+fname = cbook.get_sample_data('lena.png', asfileobj=False)
print 'fname', fname
im = plt.imread(fname)
Modified: trunk/matplotlib/examples/misc/mpl_data_test.py
===================================================================
--- trunk/matplotlib/examples/misc/mpl_data_test.py 2009-08-05 14:36:27 UTC (rev 7364)
+++ trunk/matplotlib/examples/misc/mpl_data_test.py 2009-08-05 14:38:44 UTC (rev 7365)
@@ -1,13 +1,13 @@
"""
-Demonstrate how get_mpl_data works with svn revisions in the data.
+Demonstrate how get_sample_data works with svn revisions in the data.
- svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/mpl_data
+ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
and edit testdata.csv to add a new row. After committing the changes,
when you rerun this script you will get the updated data (and the new
-svn version will be cached in ~/.matplotlib/mpl_data)
+svn version will be cached in ~/.matplotlib/sample_data)
"""
import matplotlib.cbook as cbook
-fh = cbook.get_mpl_data("testdata.csv")
+fh = cbook.get_sample_data("testdata.csv")
print fh.read()
Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 14:36:27 UTC (rev 7364)
+++ trunk/matplotlib/lib/matplotlib/cbook.py 2009-08-05 14:38:44 UTC (rev 7365)
@@ -458,12 +458,12 @@
result.msg = response.msg
return result
-def get_mpl_data(fname, asfileobj=True):
+def get_sample_data(fname, asfileobj=True):
"""
- Check the cachedirectory ~/.matplotlib/mpl_data for an mpl_data
+ Check the cachedirectory ~/.matplotlib/sample_data for an sample_data
file. If it does not exist, fetch it with urllib from the mpl svn repo
- http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/mpl_data/
+ http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/
and store it in the cachedir.
@@ -471,31 +471,31 @@
path to the file as a string will be returned
To add a datafile to this directory, you need to check out
- mpl_data from matplotlib svn::
+ sample_data from matplotlib svn::
- svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/mpl_data
+ svn co https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/sample_data
and svn add the data file you want to support. This is primarily
intended for use in mpl examples that need custom data
"""
- if not hasattr(get_mpl_data, 'opener'):
+ if not hasattr(get_sample_data, 'opener'):
configdir = matplotlib.get_configdir()
- cachedir = os.path.join(configdir, 'mpl_data')
+ cachedir = os.path.join(configdir, 'sample_data')
if not os.path.exists(cachedir):
os.mkdir(cachedir)
# Store the cache processor and url opener as attributes of this function
- get_mpl_data.processor = _CacheProcessor(cachedir)
- get_mpl_data.opener = urllib2.build_opener(get_mpl_data.processor)
+ get_sample_data.processor = _CacheProcessor(cachedir)
+ get_sample_data.opener = urllib2.build_opener(get_sample_data.processor)
- url = 'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/mpl_data/' + \
+ url = 'http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/sample_data/' + \
urllib2.quote(fname)
- response = get_mpl_data.opener.open(url)
+ response = get_sample_data.opener.open(url)
if asfileobj:
return response
else:
response.close()
- p = get_mpl_data.processor
+ p = get_sample_data.processor
return p.in_cache_dir(p.cache[url][0])
def flatten(seq, scalarp=is_scalar_or_string):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:36:37
|
Revision: 7364
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7364&view=rev
Author: jdh2358
Date: 2009-08-05 14:36:27 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
rename mpl_data sample_data
Added Paths:
-----------
trunk/sample_data/
Removed Paths:
-------------
trunk/mpl_data/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jd...@us...> - 2009-08-05 14:35:16
|
Revision: 7363
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7363&view=rev
Author: jdh2358
Date: 2009-08-05 14:35:06 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Merged revisions 7353,7358-7359 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint
........
r7353 | jdh2358 | 2009-08-04 13:46:41 -0500 (Tue, 04 Aug 2009) | 1 line
attach gtk events to mpl events -- fixes sf bug 2816580
........
r7358 | jdh2358 | 2009-08-04 21:29:12 -0500 (Tue, 04 Aug 2009) | 1 line
some fixes for osx builds on rc2
........
r7359 | jdh2358 | 2009-08-05 06:06:13 -0500 (Wed, 05 Aug 2009) | 1 line
remove dup gui event in enter/leave events in gtk
........
Modified Paths:
--------------
trunk/matplotlib/doc/_templates/indexsidebar.html
trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
trunk/matplotlib/release/osx/Makefile
trunk/matplotlib/release/osx/README.txt
Property Changed:
----------------
trunk/matplotlib/
Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
- /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7345
+ /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 /branches/v0_99_maint:1-7362
Modified: trunk/matplotlib/doc/_templates/indexsidebar.html
===================================================================
--- trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-05 12:04:36 UTC (rev 7362)
+++ trunk/matplotlib/doc/_templates/indexsidebar.html 2009-08-05 14:35:06 UTC (rev 7363)
@@ -4,7 +4,7 @@
<p>Please <a href="http://sourceforge.net/project/project_donations.php?group_id=80706">donate</a>
to support matplotlib development.</p>
-<p>A release candidate rc1 of matplotlib-0.99.0 is <a href="http://drop.io/xortel1#">available</a> for testing. Please post any bugs to the <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>
+<p>A release candidate rc2 of matplotlib-0.99.0 is <a href="http://drop.io/xortel1#">available</a> for testing. Please post any bugs to the <a href="http://sourceforge.net/tracker2/?group_id=80706">tracker</a>
</p>
<p>Watch a <a href="http://videolectures.net/mloss08_hunter_mat">video lecture</a> about matplotlib presented at <a href="http://videolectures.net/mloss08_whistler">NIPS 08 Workshop</a> <i>Machine Learning Open Source Software</i></a>.
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-08-05 12:04:36 UTC (rev 7362)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_gtk.py 2009-08-05 14:35:06 UTC (rev 7363)
@@ -197,7 +197,7 @@
step = 1
else:
step = -1
- FigureCanvasBase.scroll_event(self, x, y, step)
+ FigureCanvasBase.scroll_event(self, x, y, step, guiEvent=event)
return False # finish event propagation?
def button_press_event(self, widget, event):
@@ -205,7 +205,7 @@
x = event.x
# flipy so y=0 is bottom of canvas
y = self.allocation.height - event.y
- FigureCanvasBase.button_press_event(self, x, y, event.button)
+ FigureCanvasBase.button_press_event(self, x, y, event.button, guiEvent=event)
return False # finish event propagation?
def button_release_event(self, widget, event):
@@ -213,21 +213,21 @@
x = event.x
# flipy so y=0 is bottom of canvas
y = self.allocation.height - event.y
- FigureCanvasBase.button_release_event(self, x, y, event.button)
+ FigureCanvasBase.button_release_event(self, x, y, event.button, guiEvent=event)
return False # finish event propagation?
def key_press_event(self, widget, event):
if _debug: print 'FigureCanvasGTK.%s' % fn_name()
key = self._get_key(event)
if _debug: print "hit", key
- FigureCanvasBase.key_press_event(self, key)
+ FigureCanvasBase.key_press_event(self, key, guiEvent=event)
return False # finish event propagation?
def key_release_event(self, widget, event):
if _debug: print 'FigureCanvasGTK.%s' % fn_name()
key = self._get_key(event)
if _debug: print "release", key
- FigureCanvasBase.key_release_event(self, key)
+ FigureCanvasBase.key_release_event(self, key, guiEvent=event)
return False # finish event propagation?
def motion_notify_event(self, widget, event):
@@ -239,7 +239,7 @@
# flipy so y=0 is bottom of canvas
y = self.allocation.height - y
- FigureCanvasBase.motion_notify_event(self, x, y)
+ FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=event)
return False # finish event propagation?
def leave_notify_event(self, widget, event):
Modified: trunk/matplotlib/release/osx/Makefile
===================================================================
--- trunk/matplotlib/release/osx/Makefile 2009-08-05 12:04:36 UTC (rev 7362)
+++ trunk/matplotlib/release/osx/Makefile 2009-08-05 14:35:06 UTC (rev 7363)
@@ -1,10 +1,10 @@
-PYVERSION=2.6
+PYVERSION=2.5
PYTHON=python${PYVERSION}
SRCDIR=${PWD}
ZLIBVERSION=1.2.3
PNGVERSION=1.2.33
FREETYPEVERSION=2.3.7
-MPLVERSION=0.99.0.rc1
+MPLVERSION=0.99.0.rc2
BDISTMPKGVERSION=0.4.4
MPLSRC=matplotlib-${MPLVERSION}
MACOSX_DEPLOYMENT_TARGET=10.4
@@ -88,7 +88,7 @@
cp ../data/setup.cfg . &&\
export CFLAGS=${CFLAGS} &&\
export LDFLAGS=${LDFLAGS} &&\
- bdist_mpkg &&\
+ /Library/Frameworks/Python.framework/Versions/${PYVERSION}/bin/bdist_mpkg &&\
${PYTHON} setupegg.py bdist_egg &&\
cd dist && \
zip -ro matplotlib-${MPLVERSION}-py${PYVERSION}-macosx10.5_mpkg.zip matplotlib-${MPLVERSION}-py${PYVERSION}-macosx10.5.mpkg
Modified: trunk/matplotlib/release/osx/README.txt
===================================================================
--- trunk/matplotlib/release/osx/README.txt 2009-08-05 12:04:36 UTC (rev 7362)
+++ trunk/matplotlib/release/osx/README.txt 2009-08-05 14:35:06 UTC (rev 7363)
@@ -7,7 +7,7 @@
-------------
* :file:`bdist_mkpg` - the distutils.extension to build Installer.app
- mpkg installers.
+ mpkg installers.
* :file:`data` - some config files and patches needed for the build
@@ -19,16 +19,22 @@
How to build
--------------
-* You need a python framework build , numpy and wxpython to build the
+* You need a python framework build, numpy and wxpython to build the
mpl installers (wx requires this and we need wx to build the wxagg
- extension). You can get the three required dependencies as
- Installer apps, eg:
+ extension). I recommend building python from src as a framework build::
+ ./configure --enable-universalsdk --enable-framework
+ sudo make install
- http://www.python.org/ftp/python/2.6.2/python-2.6.2-macosx2009-04-16.dmg
- http://downloads.sourceforge.net/project/numpy/NumPy/1.3.0/numpy-1.3.0-py2.6-macosx10.5.dmg?use_mirror=voxel
- http://downloads.sourceforge.net/project/wxpython/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg?use_mirror=voxel
+ and build numpy from src too since the 2.5 numpy installer doesn't work
+ with a python built from src::
+ sudo python setup.py install
+
+ you can use the pre-built installer for wx::
+
+ http://downloads.sourceforge.net/project/wxpython/wxPython/2.8.10.1/wxPython2.8-osx-unicode-2.8.10.1-universal-py2.6.dmg?use_mirror=voxel
+
* You need to make sure to unset PKG_CONFIG_PATH to make sure the
static linking below is respected. Otherwise the mpl build script
will dynamically link using the libs from pkgconfig if you have this
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|