- Blog posts proceeding fine, should be simple to continue making them on schedule, at the pace at which I blog normally.
- Questions about Request for
Comment:
- What should I prioritize? NOGR or Labeled Array Interface?
- Labeled Array. This is critical to get correct, and will make NOGR need and scope clearer.
- What should I prioritize? NOGR or Labeled Array Interface?
- How deep into PySAL should the Labeled Array interface go?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:757bae3d1c46461b74ec91af4b14ba7c0b8aa312faf196602171864e35bfed90" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pysal as ps | |
#Lots of reload for dev. | |
try: | |
reload(network) | |
except: | |
import network | |
try: | |
reload(analysis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
##ljw | |
##./$GIT_ROOT/pysal/network/fw.py | |
from collections import defaultdict | |
import pysal as ps | |
import numpy as np | |
ntw = ps.network.network.Network(ps.examples.get_path('geodanet/streets.shp')) | |
def floyd_warshall(ntw, cost = None, directed = False): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
................F... | |
====================================================================== | |
FAIL: test_assuncao_rate (__main__.TestUtils) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "pysal/esda/tests/test_smoothing.py", line 236, in test_assuncao_rate | |
exp_assuncao, sm.assuncao_rate(e, b)[:4]) | |
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 842, in assert_array_almost_equal | |
precision=decimal) | |
File "/usr/lib/python3.4/site-packages/numpy/testing/utils.py", line 665, in assert_array_compare |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pysal as ps | |
import numpy as np | |
df = ps.pdio.read_files(ps.examples.get_path('columbus.shp')) | |
W = ps.queen_from_shapefile(ps.examples.get_path('columbus.shp')) | |
y = df['HOVAL'].values | |
y.reshape(W.n,1) | |
X = df[['CRIME', 'INC']].values |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import string | |
df = pd.DataFrame([[*string.ascii_letters[0:26:2]], | |
*string.ascii_letters[1:26:2]]) | |
rolled = df.rolling(window=2, center=False, axis=1).apply(lambda x: ''.join(x)) | |
#expected: [['ac', 'ce', 'eg', 'gi', 'ik', 'km', 'mo', 'oq', 'qs', 'su', 'uw', 'wy'], | |
# 'bd', 'df', 'fh', 'hj', 'jl', 'ln', 'np', 'pr', 'rt', 'tv', 'vx', 'xz']] | |
print(rolled.values) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer