本文整理汇总了Python中mean_sightings.get_sightings函数的典型用法代码示例。如果您正苦于以下问题:Python get_sightings函数的具体用法?Python get_sightings怎么用?Python get_sightings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_sightings函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_water_is_correct
def test_water_is_correct():
watrec, watmean = get_sightings(filename,'water')
assert watrec==2, 'Number of records for water is wrong'
assert watmean==17, 'Mean for water is wrong'
开发者ID:hareyakana,项目名称:test,代码行数:4,代码来源:test_mean_sigs.py
示例2: test_not_present
def test_not_present():
norec, nomean = get_sightings(filename, 'Not Present')
assert norec == 0, 'Biosigniture not present'
assert nomean==0, 'Mean is not present'
开发者ID:jonny-townend,项目名称:python,代码行数:4,代码来源:test_mean_sigs.py
示例3: test_anonymouse_is_correct
def test_anonymouse_is_correct():
anirec, animean = get_sightings(filename, 'NotPresent')
assert anirec == 0, 'Number of anonymous records is wrong'
assert animean == 0 , 'Mean for anonymous animal rec is wrong'
开发者ID:ryanlloyd,项目名称:testing,代码行数:4,代码来源:test_mean_sightings.py
示例4: test_Mouse_is_correct
def test_Mouse_is_correct():
mouserec, mousemean = get_sightings(filename, 'Mouse')
assert mouserec == 12, 'Mouse number wrong'
assert mousemean == 1, 'Mouse mean wrong'
开发者ID:ryanlloyd,项目名称:testing,代码行数:4,代码来源:test_mean_sightings.py
示例5: test_owl_is_correct
def test_owl_is_correct():
owlrec, owlmean = get_sightings(filename, 'Owl')
# assert test_statement message_if_test_is_false
assert owlrec == 2, 'Number of records for owl is wrong'
assert owlmean == 17#, 'Mean sightings for owl is wrong'
开发者ID:yuwei2341,项目名称:ProjSWC,代码行数:5,代码来源:test_mean_sightings.py
示例6: test_nothing_is_correct
def test_nothing_is_correct():
norec, nomean = get_sightings(filename, 'NotPresent')
assert norec == 0, 'Biosignature missing should return zero records'
assert nomean == 0, 'Biosignature missing should return zero mean'
开发者ID:Avitus-theo,项目名称:boot-camp-dump,代码行数:4,代码来源:test_mean_sightings_final_step7.py
示例7: test_Muskox_is_correct
def test_Muskox_is_correct():
muskrec, muskmean = get_sightings(filename, 'Muskox')
assert muskrec == 2, 'Number of records for Muskox is wrong'
assert muskmean == 25.5, 'Mean sightings for Muskox is wrong'
开发者ID:lurbisci,项目名称:camera_analysis,代码行数:4,代码来源:test_mean_sightings.py
示例8: test_animal_not_present
def test_animal_not_present():
animrec, animmean = get_sightings(filename, 'NotPresent')
assert animrec == 0, 'Animal missing should return zero records'
assert animmean == 0, 'Animal missing should return zero mean'
开发者ID:yuwei2341,项目名称:ProjSWC,代码行数:4,代码来源:test_mean_sightings.py
示例9: get_sightings
figFILE = os.path.join(outDIR,'spp_fig.png')
# Set names of species to count
spp_names = ['Fox', 'Wolf', 'Grizzly', 'Wolverine']
# ------------------------------------------------------------------------
# Perform analysis
# ------------------------------------------------------------------------
# Declare empty list to hold counts of records
spp_recs = []
# Get total number of records for each species
for spp in spp_names:
totalrecs, meancount = get_sightings(dataFILE, spp)
spp_recs.append(totalrecs)
print('spp_names')
print( spp_names )
print('spp_recs')
print( spp_recs )
print('[spp_names, spp_recs]')
print( [spp_names, spp_recs] )
print('np.transpose([spp_names, spp_recs])')
print( np.transpose([spp_names, spp_recs]) )
# ------------------------------------------------------------------------
开发者ID:paradisepilot,项目名称:statistics,代码行数:31,代码来源:runall.py
示例10: get_sightings
fig_name = 'spp_fig.png'
# Set names of species to count
spp_names = ['Fox', 'Wolf', 'Grizzly', 'Wolverine']
# ------------------------------------------------------------------------
# Perform analysis
# ------------------------------------------------------------------------
# Declare empty list to hold counts of records
spp_recs = []
# Get total number of records for each species
for spp in spp_names:
totalrecs, meancount = get_sightings(data_dir + data_name, spp)
spp_recs.append(totalrecs)
print spp_names
print spp_recs
# ------------------------------------------------------------------------
# Save results as table
# ------------------------------------------------------------------------
# Put two lists into a pandas DataFrame
table = pd.DataFrame(np.array(zip(spp_names, spp_recs),
dtype=[('species', 'S12'), ('recs', int)]))
# Save DataFrame as csv
table.to_csv(results_dir + table_name, index=False)
开发者ID:yuwei2341,项目名称:ProjSWC,代码行数:31,代码来源:runall.py
示例11: test_clay_is_corrrect
def test_clay_is_corrrect():
clayrec,claymean = get_sightings(filename,"Clay")
assert clayrec==2, "number of records for clay is wrong"
assert claymean==25.5, "clay mean is wrong"
开发者ID:todge2,项目名称:python,代码行数:4,代码来源:test_mean.py
示例12: test_water_is_corrrect
def test_water_is_corrrect():
watrec,watmean = get_sightings(filename,"Water")
assert watrec==2, "number of records for water is wrong"
assert watmean==17, "water mean is wrong"
开发者ID:todge2,项目名称:python,代码行数:4,代码来源:test_mean.py
示例13: test_not_present
def test_not_present():
norec,nomean = get_sightings(filename, "not present")
assert norec==0, "Biosig not present"
assert nomean ==0, "mean is not present"
开发者ID:todge2,项目名称:python,代码行数:4,代码来源:test_mean.py
示例14: test_pig_is_correct
def test_pig_is_correct():
pigrec, pigmean = get_sightings(filename, 'Pig')
assert pigrec == 1, 'Number of records for Pig is wrong'
assert pigmean == 4, 'Mean sightings for Pig is wrong'
开发者ID:NeilWilkins,项目名称:python_unit_testing,代码行数:4,代码来源:test_mean_sightings.py
示例15: test_not_present
def test_not_present():
norec,nomean = get_sightings(file,'Not present')
assert norec == 0, 'Biosignature not present, has zero recs.'
assert nomean == 0, 'Mean is not present for missing Biosig.'
开发者ID:madcabby,项目名称:git_projectmt,代码行数:4,代码来源:test_mean_sigs.py
示例16: test_cow_is_correct
def test_cow_is_correct():
cowrec, cowmean = get_sightings(filename, 'Cow')
assert cowrec == 2, 'Number of records for Cow is wrong'
assert cowmean == 17, 'Mean sightings for Cow is wrong'
开发者ID:NeilWilkins,项目名称:python_unit_testing,代码行数:4,代码来源:test_mean_sightings.py
示例17: test_water
def test_water():
watrec,watmean = get_sightings(file,'Water')
assert watrec == 2, 'Number of records for water is wrong.'
assert watmean == 17, 'Mean for water is wrong'
开发者ID:madcabby,项目名称:git_projectmt,代码行数:4,代码来源:test_mean_sigs.py
示例18: test_animal_case
def test_animal_case():
animrec, animmean = get_sightings(filename, 'oWL')
assert animrec == 2
assert animmean == 17
开发者ID:yuwei2341,项目名称:ProjSWC,代码行数:4,代码来源:test_mean_sightings.py
示例19: test_Clay
def test_Clay():
clayrec,claymean = get_sightings(file,'Clay')
assert clayrec == 2, 'Number of records for clay is wrong.'
assert claymean == 25.5, 'Mean for clay is wrong'
开发者ID:madcabby,项目名称:git_projectmt,代码行数:4,代码来源:test_mean_sigs.py
示例20: test_muskox_is_correct
def test_muskox_is_correct():
muskoxrec, muskoxmean = get_sightings(filename, 'Muskox')
# assert test_statement message_if_test_is_false
assert muskoxrec == 2, 'Number of records for muskox is wrong'
assert muskoxmean == 25.5#, 'Mean sightings for muskox is wrong'
开发者ID:yuwei2341,项目名称:ProjSWC,代码行数:5,代码来源:test_mean_sightings.py
注:本文中的mean_sightings.get_sightings函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论