import numpy as np


class SymmetricBilinearForm(object):
    def __init__(self, abc):
        """
        abc: (uv) => (A,B,C)
            A vectorized function that produces
            the coefficents of the form
        """
        self.abc = abc

    def matrix(self, uv):
        A, B, C = self.abc(uv)

        # fmt: off
        return np.array(
            [[A, B], 
            [B, C]]
        ).swapaxes(0, 2).swapaxes(1, 2)
        # fmt: on

0fedbb1e9b0dc8dd42fbeec10f45fd5df0fe8b7a
<mask token>


class SymmetricBilinearForm(object):
    <mask token>
    <mask token>

<mask token>


class SymmetricBilinearForm(object):
    <mask token>

    def matrix(self, uv):
        A, B, C = self.abc(uv)
        return np.array([[A, B], [B, C]]).swapaxes(0, 2).swapaxes(1, 2)

<mask token>


class SymmetricBilinearForm(object):

    def __init__(self, abc):
        """
        abc: (uv) => (A,B,C)
            A vectorized function that produces
            the coefficents of the form
        """
        self.abc = abc

    def matrix(self, uv):
        A, B, C = self.abc(uv)
        return np.array([[A, B], [B, C]]).swapaxes(0, 2).swapaxes(1, 2)

import numpy as np


class SymmetricBilinearForm(object):

    def __init__(self, abc):
        """
        abc: (uv) => (A,B,C)
            A vectorized function that produces
            the coefficents of the form
        """
        self.abc = abc

    def matrix(self, uv):
        A, B, C = self.abc(uv)
        return np.array([[A, B], [B, C]]).swapaxes(0, 2).swapaxes(1, 2)

import numpy as np


class SymmetricBilinearForm(object):
    def __init__(self, abc):
        """
        abc: (uv) => (A,B,C)
            A vectorized function that produces
            the coefficents of the form
        """
        self.abc = abc

    def matrix(self, uv):
        A, B, C = self.abc(uv)

        # fmt: off
        return np.array(
            [[A, B], 
            [B, C]]
        ).swapaxes(0, 2).swapaxes(1, 2)
        # fmt: on
