def to_ising(self):
        """Converts a binary quadratic model to Ising format.

        If the binary quadratic model's vartype is not :class:`.Vartype.SPIN`,
        values are converted.

        Returns:
            tuple: 3-tuple of form (`linear`, `quadratic`, `offset`), where `linear`
            is a dict of linear biases, `quadratic` is a dict of quadratic biases,
            and `offset` is a number that represents the constant offset of the
            binary quadratic model.

        Examples:
            This example converts a binary quadratic model to an Ising problem.

            >>> import dimod
            >>> model = dimod.BinaryQuadraticModel({0: 1, 1: -1, 2: .5},
            ...                                    {(0, 1): .5, (1, 2): 1.5},
            ...                                    1.4,
            ...                                    dimod.SPIN)
            >>> model.to_ising()    # doctest: +SKIP
            ({0: 1, 1: -1, 2: 0.5}, {(0, 1): 0.5, (1, 2): 1.5}, 1.4)

        """
        # cast to a dict
        return dict(self.spin.linear), dict(self.spin.quadratic), self.spin.offset
Converts a binary quadratic model to Ising format.

        If the binary quadratic model's vartype is not :class:`.Vartype.SPIN`,
        values are converted.

        Returns:
            tuple: 3-tuple of form (`linear`, `quadratic`, `offset`), where `linear`
            is a dict of linear biases, `quadratic` is a dict of quadratic biases,
            and `offset` is a number that represents the constant offset of the
            binary quadratic model.

        Examples:
            This example converts a binary quadratic model to an Ising problem.

            >>> import dimod
            >>> model = dimod.BinaryQuadraticModel({0: 1, 1: -1, 2: .5},
            ...                                    {(0, 1): .5, (1, 2): 1.5},
            ...                                    1.4,
            ...                                    dimod.SPIN)
            >>> model.to_ising()    # doctest: +SKIP
            ({0: 1, 1: -1, 2: 0.5}, {(0, 1): 0.5, (1, 2): 1.5}, 1.4)