classes to inherit from objects

This commit is contained in:
Andy Eschbacher
2017-01-12 12:00:36 -05:00
parent e456158cbf
commit 7322931ca1
6 changed files with 6 additions and 5 deletions

View File

@@ -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:

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -2,6 +2,7 @@
import random
import numpy
def set_random_seeds(value):
"""
Set the seeds of the RNGs (Random Number Generators)

View File

@@ -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()