#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2022/8/19 10:25:51

@author: LiuKuan
@copyright: Apache License, Version 2.0
'''
import numpy as np
import random
# ===============================================================================
'''
'''
# ===============================================================================

__all__ = [
            'pr',
            'init_seeds',
           ]

def pr(data, info = None):
    '''print detail data information
    '''
    if info is not None:
        msg = f"==== {info} ==== "
    else:
        msg = ''
    msg += f'type:{type(data)} id:{id(data)}\n'

    if isinstance(data, np.ndarray):
        msg += f'    shape:{data.shape}\n' \
               f'    dtype:{data.dtype}\n'
    elif isinstance(data, np.dtype):
        print()
    msg += f'{data}'
    print(msg)


def init_seeds(seed=0):
    # Initialize random number generator (RNG) seeds
    random.seed(seed)
    np.random.seed(seed)