classes to inherit from objects
This commit is contained in:
@@ -11,7 +11,7 @@ def verify_data(data):
|
||||
plpy.error(NULL_VALUE_ERROR)
|
||||
|
||||
|
||||
class AnalysisDataProvider:
|
||||
class AnalysisDataProvider(object):
|
||||
def get_getis(self, w_type, params):
|
||||
"""fetch data for getis ord's g"""
|
||||
try:
|
||||
|
||||
@@ -12,7 +12,7 @@ from crankshaft.analysis_data_provider import AnalysisDataProvider
|
||||
# High level interface ---------------------------------------
|
||||
|
||||
|
||||
class Getis:
|
||||
class Getis(object):
|
||||
def __init__(self, data_provider=None):
|
||||
if data_provider is None:
|
||||
self.data_provider = AnalysisDataProvider()
|
||||
|
||||
@@ -4,7 +4,7 @@ import numpy as np
|
||||
from crankshaft.analysis_data_provider import AnalysisDataProvider
|
||||
|
||||
|
||||
class Kmeans:
|
||||
class Kmeans(object):
|
||||
def __init__(self, data_provider=None):
|
||||
if data_provider is None:
|
||||
self.data_provider = AnalysisDataProvider()
|
||||
|
||||
@@ -15,7 +15,7 @@ import crankshaft.pysal_utils as pu
|
||||
# High level interface ---------------------------------------
|
||||
|
||||
|
||||
class Moran:
|
||||
class Moran(object):
|
||||
def __init__(self, data_provider=None):
|
||||
if data_provider is None:
|
||||
self.data_provider = AnalysisDataProvider()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import random
|
||||
import numpy
|
||||
|
||||
|
||||
def set_random_seeds(value):
|
||||
"""
|
||||
Set the seeds of the RNGs (Random Number Generators)
|
||||
|
||||
@@ -11,7 +11,7 @@ import crankshaft.pysal_utils as pu
|
||||
from crankshaft.analysis_data_provider import AnalysisDataProvider
|
||||
|
||||
|
||||
class Markov:
|
||||
class Markov(object):
|
||||
def __init__(self, data_provider=None):
|
||||
if data_provider is None:
|
||||
self.data_provider = AnalysisDataProvider()
|
||||
|
||||
Reference in New Issue
Block a user