Project Name: jina-ai+clip-as-service
Language: Python
Statement Type: API

Source Code:
def test_server_preprocess_ndarray_image(image_uri, size):
    d1 = Document(uri=image_uri)
    d1.load_uri_to_blob()
    d2 = Document(uri=image_uri)
    d2.load_uri_to_image_tensor()

    t1 = _transform_blob(size)(d1.blob).numpy()
    t2 = _transform_ndarray(size)(d2.tensor).numpy()
    assert t1.shape == t2.shape

test_server_preprocess_ndarray_image(image_uri='/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/jina-ai+clip-as-service/jina-ai+clip-as-service/tests/img/00000.jpg', size=224)

Selected Statement: t2 = _transform_ndarray(size)(d2.tensor).numpy()

Function Input:
image_uri: '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/jina-ai+clip-as-service/jina-ai+clip-as-service/tests/img/00000.jpg'
size: 224

Variable Values Before Statement:
size: 224

Value After Statement Execution: array([[[-1.8293927 ,  0.99326   ,  1.218778  , ..., -0.76831955,         -0.69819516, -0.6261791 ],        [-1.871253  ,  0.83835363,  1.1161801 , ..., -0.71867406,         -0.66353786, -0.5779885 ],        [-1.8495831 ,  0.3691529 ,  1.0339135 , ..., -0.60506105,         -0.5474743 , -0.5001206 ],        ...,        [-1.8324506 ,  0.46106532,  0.7589506 , ..., -1.3229892 ,         -1.4584173 , -1.509373  ],        [-1.8534997 ,  0.37634084,  0.6575078 , ..., -1.3002565 ,         -1.4684434 , -1.5584292 ],        [-1.8524398 ,  0.32740185,  0.56791097, ..., -1.275775  ,         -1.4632285 , -1.5475469 ]],       [[-1.8205297 ,  1.0893543 ,  1.31915   , ..., -0.27816093,         -0.18627533, -0.11378706],        [-1.8304325 ,  0.9543234 ,  1.2362387 , ..., -0.30391544,         -0.20329967, -0.11902631],        [-1.8111343 ,  0.4697153 ,  1.1526138 , ..., -0.29344058,         -0.21467075, -0.16618787],        ...,        [-1.6441311 ,  0.7576508 ,  1.1757797 , ..., -1.7395262 ,         -1.7533139 , -1.7488168 ],        [-1.5793352 ,  0.84063566,  1.2314364 , ..., -1.6973344 ,         -1.7601075 , -1.7529469 ],        [-1.4979699 ,  0.8915888 ,  1.2598896 , ..., -1.6417253 ,         -1.7217588 , -1.75764   ]],       [[-1.3964468 ,  1.3654916 ,  1.5833169 , ...,  0.11189864,          0.14282744,  0.18943931],        [-1.4222968 ,  1.2280223 ,  1.4979748 , ...,  0.10506461,          0.13882811,  0.19719559],        [-1.3639748 ,  0.79668385,  1.4436656 , ...,  0.11625384,          0.14236891,  0.16509578],        ...,        [-1.539558  ,  0.6254223 ,  0.88010895, ..., -1.4571475 ,         -1.4812293 , -1.4754997 ],        [-1.5454704 ,  0.67148876,  0.92816603, ..., -1.4164418 ,         -1.4880763 , -1.4814891 ],        [-1.4934982 ,  0.72418857,  0.94967735, ..., -1.371076  ,         -1.4606231 , -1.4841652 ]]], dtype

Variable States During Runtime (line, value):
image_uri: 1
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/jina-ai+clip-as-service/jina-ai+clip-as-service/tests/img/00000.jpg'
size: 1
224
d1: 2
<Document ('id', 'mime_type', 'uri') at 3b1f02f040a677b8a7dfd83176b52d78>
3
<Document ('id', 'blob', 'mime_type', 'uri') at 3b1f02f040a677b8a7dfd83176b52d78>
d2: 4
<Document ('id', 'mime_type', 'uri') at eee52bb275edc026b2fb333d7656e3c6>
5
<Document ('id', 'tensor', 'mime_type', 'uri') at eee52bb275edc026b2fb333d7656e3c6>
t1: 7
array([[[-1.7922626 ,  0.99603695,  1.2296118 , ..., -0.7703726 ,         -0.6973805 , -0.6243884 ],        [-1.7922626 ,  0.8354542 ,  1.1274228 , ..., -0.72657734,         -0.6681836 , -0.5805931 ],        [-1.7922626 ,  0.36830464,  1.0252337 , ..., -0.59519154,         -0.5367978 , -0.50760096],        ...,        [-1.7922626 ,  0.4704936 ,  0.76246214, ..., -1.3251129 ,         -1.4564987 , -1.5148925 ],        [-1.7922626 ,  0.38290307,  0.6456747 , ..., -1.2959161 ,         -1.4710971 , -1.5586877 ],        [-1.7922626 ,  0.32450938,  0.5726826 , ..., -1.2813176 ,         -1.4710971 , -1.5440893 ]],       [[-1.7520971 ,  1.0843711 ,  1.3244953 , ..., -0.2813358 ,         -0.1912892 , -0.11625037],        [-1.7520971 ,  0.9493012 ,  1.2344488 , ..., -0.31135136,         -0.20629698, -0.11625037],        [-1.7520971 ,  0.46905264,  1.1444021 , ..., -0.29634356,         -0.20629698, -0.16127367],        ...,        [-1.6320349 ,  0.7542002 ,  1.1744177 , ..., -1.7370893 ,         -1.7520971 , -1.7520971 ],        [-1.5720038 ,  0.8442468 ,  1.2344488 , ..., -1.7070738 ,         -1.7520971 , -1.7520971 ],        [-1.496965  ,  0.8892701 ,  1.2494565 , ..., -1.6320349 ,         -1.7220815 , -1.7520971 ]],       [[-1.3948994 ,  1.3637935 ,  1.5770944 , ...,  0.11242763,          0.14086775,  0.18352796],        [-1.4233395 ,  1.2358129 ,  1.4917741 , ...,  0.09820756,          0.14086775,  0.19774802],        [-1.3664593 ,  0.7949909 ,  1.4491138 , ...,  0.11242763,          0.14086775,  0.16930789],        ...,        [-1.4802198 ,  0.6243501 ,  0.88031125, ..., -1.4517797 ,         -1.4802198 , -1.4802198 ],        [-1.4802198 ,  0.6670103 ,  0.93719155, ..., -1.4233395 ,         -1.4802198 , -1.4802198 ],        [-1.4802198 ,  0.72389054,  0.9514116 , ..., -1.3806794 ,         -1.4659997 , -1.4802198 ]]], dtype=float32)
t2: 8
array([[[-1.8293927 ,  0.99326   ,  1.218778  , ..., -0.76831955,         -0.69819516, -0.6261791 ],        [-1.871253  ,  0.83835363,  1.1161801 , ..., -0.71867406,         -0.66353786, -0.5779885 ],        [-1.8495831 ,  0.3691529 ,  1.0339135 , ..., -0.60506105,         -0.5474743 , -0.5001206 ],        ...,        [-1.8324506 ,  0.46106532,  0.7589506 , ..., -1.3229892 ,         -1.4584173 , -1.509373  ],        [-1.8534997 ,  0.37634084,  0.6575078 , ..., -1.3002565 ,         -1.4684434 , -1.5584292 ],        [-1.8524398 ,  0.32740185,  0.56791097, ..., -1.275775  ,         -1.4632285 , -1.5475469 ]],       [[-1.8205297 ,  1.0893543 ,  1.31915   , ..., -0.27816093,         -0.18627533, -0.11378706],        [-1.8304325 ,  0.9543234 ,  1.2362387 , ..., -0.30391544,         -0.20329967, -0.11902631],        [-1.8111343 ,  0.4697153 ,  1.1526138 , ..., -0.29344058,         -0.21467075, -0.16618787],        ...,        [-1.6441311 ,  0.7576508 ,  1.1757797 , ..., -1.7395262 ,         -1.7533139 , -1.7488168 ],        [-1.5793352 ,  0.84063566,  1.2314364 , ..., -1.6973344 ,         -1.7601075 , -1.7529469 ],        [-1.4979699 ,  0.8915888 ,  1.2598896 , ..., -1.6417253 ,         -1.7217588 , -1.75764   ]],       [[-1.3964468 ,  1.3654916 ,  1.5833169 , ...,  0.11189864,          0.14282744,  0.18943931],        [-1.4222968 ,  1.2280223 ,  1.4979748 , ...,  0.10506461,          0.13882811,  0.19719559],        [-1.3639748 ,  0.79668385,  1.4436656 , ...,  0.11625384,          0.14236891,  0.16509578],        ...,        [-1.539558  ,  0.6254223 ,  0.88010895, ..., -1.4571475 ,         -1.4812293 , -1.4754997 ],        [-1.5454704 ,  0.67148876,  0.92816603, ..., -1.4164418 ,         -1.4880763 , -1.4814891 ],        [-1.4934982 ,  0.72418857,  0.94967735, ..., -1.371076  ,         -1.4606231 , -1.4841652 ]]], dtype=float32)
@py_assert1: 9
None
@py_assert5: 9
None
@py_assert3: 9
None