Install & Compatibility
Where this runs
tested against v2.3.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 28.8s · import 14.428s · 770MB
848MB installed
● package 848MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Markov
✓ from giddy.markov import Markov
Spatial_Markov
✓ from giddy.markov import Spatial_Markov
LISA_Markov
✓ from giddy.markov import LISA_Markov
Tau
✓ from giddy.ranking import Tau
Sequence
✓ from giddy.sequence import Sequence
giddy
✓ import giddy
✗ from giddy import *
Star imports are discouraged because the package's top-level __init__ exports many symbols; explicit imports reduce namespace pollution.
Basic usage of Markov and Spatial_Markov classes.
import libpysal
from giddy.markov import Markov, Spatial_Markov
import numpy as np
# Create a simple transition matrix from random data
np.random.seed(100)
data = np.random.randint(0, 3, size=(10, 5))
m = Markov(data)
print(m.p)
print(m.classes)
# For spatial Markov, we need spatial weights
w = libpysal.weights.util.lat2W(4, 4)
# Ensure same number of spatial units as rows in data
# (this example is illustrative; actual use requires matching dimensions)
Errors
Common errors & fixes
ImportError: cannot import name 'Spatial_Markov' from 'giddy'
The symbol is not exported at the package level; it must be imported from the submodule.
fixUse 'from giddy.markov import Spatial_Markov' instead of 'from giddy import Spatial_Markov'.
ValueError: setting an array element with a sequence.
Often occurs when providing ragged data (lists of different lengths) to Markov or Spatial_Markov.
fixEnsure the input data is a 2D numpy array or rectangular list of lists with consistent dimensions.
Upgrade
Version history
2.3.8latest on PyPI · released Dec 5, 2025
Audit
Dependencies
libpysalrequiredCore dependency for spatial weights and other PySAL utilities
esdarequiredExploratory spatial data analysis routines
mapclassifyoptionalClassification schemes for mapping
splotoptionalVisualization support (optional, but recommended for plotting)