quantnn/generic/__init__.py
def _get_backend_module(name):
    """
    Return module object corresponding to given backend.

    Args:
       The name of the backend.

    Return:
       The corresponding module object.
    """
    if name == "numpy":
        import numpy as np

        return np
    if name == "numpy.ma":
        import numpy as np

        return np.ma
    if name == "torch":
        import torch

        return torch
    if name == "jax":
        import jax
        import jax.numpy as jnp

        _JAX_KEY = jax.random.PRNGKey(0)
        return jnp
    if name == "tensorflow":
        import tensorflow as tf

        return tf

    Return module object corresponding to given backend.

    Args:
       The name of the backend.

    Return:
       The corresponding module object.
    
Return module object corresponding to given backend.
Args:
The name of the backend.

The corresponding module object.
Return module object corresponding to given backend . Args : The name of the backend . The corresponding module object .
def _get_backend_module(name):
    if name == "numpy":
        import numpy as np
        return np
    if name == "numpy.ma":
        import numpy as np
        return np.ma
    if name == "torch":
        import torch
        return torch
    if name == "jax":
        import jax
        import jax.numpy as jnp
        _JAX_KEY = jax.random.PRNGKey(0)
        return jnp
    if name == "tensorflow":
        import tensorflow as tf
        return tf
def _get_backend_module ( name ) : if name == "numpy" : import numpy as np return np if name == "numpy.ma" : import numpy as np return np . ma if name == "torch" : import torch return torch if name == "jax" : import jax import jax . numpy as jnp _JAX_KEY = jax . random . PRNGKey ( 0 ) return jnp if name == "tensorflow" : import tensorflow as tf return tf
Return module object corresponding to given backend.
Return module object corresponding to given backend .
"""
    Return module object corresponding to given backend.

    Args:
       The name of the backend.

    Return:
       The corresponding module object.
    """
name