<s> from __future__ import division , print_function , absolute_import <EOL> from numpy . testing import run_module_suite , assert_equal , assert_allclose <EOL> import scipy . constants as sc <EOL> def test_convert_temperature ( ) : <EOL> assert_equal ( sc . convert_temperature ( <NUM_LIT:32> , '<STR_LIT:f>' , '<STR_LIT>' ) , <NUM_LIT:0> ) <EOL> assert_equal ( sc . convert_temperature ( [ <NUM_LIT:0> , <NUM_LIT:0> ] , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> [ <NUM_LIT> , <NUM_LIT> ] ) <EOL> assert_equal ( sc . convert_temperature ( [ <NUM_LIT:0> , <NUM_LIT:0> ] , '<STR_LIT>' , '<STR_LIT:c>' ) , <EOL> [ - <NUM_LIT> , - <NUM_LIT> ] ) <EOL> assert_equal ( sc . convert_temperature ( [ <NUM_LIT:32> , <NUM_LIT:32> ] , '<STR_LIT:f>' , '<STR_LIT:k>' ) , [ <NUM_LIT> , <NUM_LIT> ] ) <EOL> assert_equal ( sc . convert_temperature ( [ <NUM_LIT> , <NUM_LIT> ] , '<STR_LIT>' , '<STR_LIT:F>' ) , <EOL> [ <NUM_LIT:32> , <NUM_LIT:32> ] ) <EOL> assert_equal ( sc . convert_temperature ( [ <NUM_LIT:0> , <NUM_LIT:0> ] , '<STR_LIT:C>' , '<STR_LIT>' ) , [ <NUM_LIT:32> , <NUM_LIT:32> ] ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT:0> , <NUM_LIT:0> ] , '<STR_LIT:c>' , '<STR_LIT:r>' ) , [ <NUM_LIT> , <NUM_LIT> ] , <EOL> rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT> , <NUM_LIT> ] , '<STR_LIT>' , '<STR_LIT:C>' ) , <EOL> [ <NUM_LIT:0.> , <NUM_LIT:0.> ] , rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT> , <NUM_LIT> ] , '<STR_LIT:r>' , '<STR_LIT:F>' ) , <EOL> [ <NUM_LIT> , <NUM_LIT> ] , rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT:32> , <NUM_LIT:32> ] , '<STR_LIT>' , '<STR_LIT:R>' ) , <EOL> [ <NUM_LIT> , <NUM_LIT> ] , rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT> , <NUM_LIT> ] , '<STR_LIT>' , '<STR_LIT:R>' ) , <EOL> [ <NUM_LIT> , <NUM_LIT> ] , rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> assert_allclose ( sc . convert_temperature ( [ <NUM_LIT> , <NUM_LIT:0.> ] , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> [ <NUM_LIT> , <NUM_LIT:0.> ] , rtol = <NUM_LIT:0.> , atol = <NUM_LIT> ) <EOL> def test_fahrenheit_to_celcius ( ) : <EOL> assert_equal ( sc . F2C ( <NUM_LIT:32> ) , <NUM_LIT:0> ) <EOL> assert_equal ( sc . F2C ( [ <NUM_LIT:32> , <NUM_LIT:32> ] ) , [ <NUM_LIT:0> , <NUM_LIT:0> ] ) <EOL> def test_celcius_to_kelvin ( ) : <EOL> assert_equal ( sc . C2K ( [ <NUM_LIT:0> , <NUM_LIT:0> ] ) , [ <NUM_LIT> , <NUM_LIT> ] ) <EOL> def test_kelvin_to_celcius ( ) : <EOL> assert_equal ( sc . K2C ( [ <NUM_LIT:0> , <NUM_LIT:0> ] ) , [ - <NUM_LIT> , - <NUM_LIT> ] ) <EOL> def test_fahrenheit_to_kelvin ( ) : <EOL> assert_equal ( sc . F2K ( [ <NUM_LIT:32> , <NUM_LIT:32> ] ) , [ <NUM_LIT> , <NUM_LIT> ] ) <EOL> def test_kelvin_to_fahrenheit ( ) : <EOL> assert_equal ( sc . K2F ( [ <NUM_LIT> , <NUM_LIT> ] ) , [ <NUM_LIT:32> , <NUM_LIT:32> ] ) <EOL> def test_celcius_to_fahrenheit ( ) : <EOL> assert_equal ( sc . C2F ( [ <NUM_LIT:0> , <NUM_LIT:0> ] ) , [ <NUM_LIT:32> , <NUM_LIT:32> ] ) <EOL> def test_lambda_to_nu ( ) : <EOL> assert_equal ( sc . lambda2nu ( sc . speed_of_light ) , <NUM_LIT:1> ) <EOL> def test_nu_to_lambda ( ) : <EOL> assert_equal ( sc . nu2lambda ( <NUM_LIT:1> ) , sc . speed_of_light ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> run_module_suite ( ) </s>
