當前位置: 首頁>>代碼示例>>Python>>正文


Python Params.datatype方法代碼示例

本文整理匯總了Python中params.Params.datatype方法的典型用法代碼示例。如果您正苦於以下問題:Python Params.datatype方法的具體用法?Python Params.datatype怎麽用?Python Params.datatype使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在params.Params的用法示例。


在下文中一共展示了Params.datatype方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import datatype [as 別名]
import makeunitdb
from ocptype import ANNOTATION, UINT32
from params import Params
from ramon import H5AnnotationFile, setField, getField, queryField, makeAnno, createSpecificSynapse
from postmethods import putAnnotation, getAnnotation, getURL, postURL
import kvengine_to_test
import site_to_test
#from ocpgraph import genGraphRAMON
SITE_HOST = site_to_test.site

p = Params()
p.token = 'unittest'
p.resolution = 0
p.channels = ['ANNO1']
p.channel_type = ANNOTATION
p.datatype = UINT32

class Test_GraphGen:

  def setup_class(self):
    """Create the unittest database"""
    makeunitdb.createTestDB(p.token, channel_list=p.channels, public=True, readonly=0)

    cutout1 = "0/2,5/1,3/0,2"
    cutout2 = "0/1,3/4,6/2,5"
    cutout3 = "0/4,6/2,5/5,7"
    cutout4 = "0/6,8/5,9/2,4"

    syn_segments1 = [[7, 3], ]
    syn_segments2 = [[7, 4], ]
    syn_segments3 = [[3, 9], ]
開發者ID:j6k4m8,項目名稱:ndstore,代碼行數:33,代碼來源:test_graphgen.py

示例2: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import datatype [as 別名]
import random
import numpy as np

import settings
from blaze import ndlib
from params import Params
from postmethods import postHDF5, getHDF5

p = Params()
p.token = "blaze"
p.resolution = 0
p.channels = ['image']
p.window = [0,0]
p.channel_type = "image"
p.datatype = "uint8"

class Test_Hdf5:

  def test_simple(self):
    """Test a simple post"""

  # Posting zindex 0
  #[x,y,z] = ndlib.MortonXYZ(0)
  #p.args = (x*128, (x+1)*128, y*128, (y+1)*128, z*16, (z+1)*16)
  #image_data = np.ones([1,16,128,128], dtype=np.uint8) * random.randint(0,255)
  #response = postHDF5(p, image_data)

  #p.args = (0,256,0,256,0,16)
  #h5f = getHDF5(p)
開發者ID:neurodata,項目名稱:ndblaze,代碼行數:31,代碼來源:test_get_hdf5.py

示例3: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import datatype [as 別名]
import time

sys.path += [os.path.abspath('../django/')]
import OCP.settings
os.environ['DJANGO_SETTINGS_MODULE'] = 'ocpblaze.settings'

from ocplib import MortonXYZ
from params import Params

p = Params()
p.token = "blaze"
p.resolution = 0
p.channels = ['image']
p.window = [0,0]
p.channel_type = "image"
p.datatype = "uint32"
SIZE = 1024
ZSIZE = 16

def generateURL(zidx):
  """Run the Benchmark."""

  i = zidx
  [x,y,z] = MortonXYZ(i)
  p.args = (x*SIZE, (x+1)*SIZE, y*SIZE, (y+1)*SIZE, z*ZSIZE, (z+1)*ZSIZE)
  image_data = np.ones([1,ZSIZE,SIZE,SIZE], dtype=np.uint32) * random.randint(0,255)
  return postBlosc(p, image_data)

def generateURL2(zidx):
  [x,y,z] = MortonXYZ(zidx)
  p.args = (x*SIZE, (x+1)*SIZE, y*SIZE, (y+1)*SIZE, z*ZSIZE, (z+1)*ZSIZE)
開發者ID:j6k4m8,項目名稱:ndstore,代碼行數:33,代碼來源:benchmark.py

示例4: Params

# 需要導入模塊: from params import Params [as 別名]
# 或者: from params.Params import datatype [as 別名]
# 2 - test_npz_incorrect_region
# 3 - test_npz_incorrect_datatype
# 4 - test_hdf5
# 5 - test_hdf5_incorrect_region
# 6 - test_hdf5_incorrect_datatype
# 7 - test_npz_incorrect_channel
# 8 - test_hdf5_incorrect_channel


p = Params()
p.token = 'unittest'
p.resolution = 0
p.channels = ['CHAN1', 'CHAN2']
p.window = [0,500]
p.channel_type = IMAGE
p.datatype = FLOAT32
#p.args = (3000,3100,4000,4100,500,510)


class Test_Probability_Slice:

  def setup_class(self):

    makeunitdb.createTestDB(p.token, channel_list=p.channels, channel_type=p.channel_type, channel_datatype=p.datatype)

  def teardown_class(self):
    makeunitdb.deleteTestDB(p.token)

  def test_xy (self):
    """Test the xy slice cutout"""
開發者ID:j6k4m8,項目名稱:ndstore,代碼行數:32,代碼來源:test_probability.py


注:本文中的params.Params.datatype方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。