Repository: scipy/scipy
File: scipy/odr/_odrpack.py (Python)

Code before:
        self.stpb = _conv(stpb)
        self.stpd = _conv(stpd)
        self.sclb = _conv(sclb)
        self.scld = _conv(scld)
        self.work = _conv(work)
        self.iwork = _conv(iwork)

        self.output = None

        self._check()

    def _check(self):
        """ Check the inputs for consistency, but don't bother checking things
        that the builtin function odr will check.
        """

        x_s = list(self.data.x.shape)

        if isinstance(self.data.y, np.ndarray):
            y_s = list(self.data.y.shape)
            if self.model.implicit:
                raise OdrError("an implicit model cannot use response data")
            if self.job is not None and (self.job % 10) == 1:
                raise OdrError("the self.job parameter was set to 1 mod 10;"
                               " this configures an implicit model, and"
                               " an implicit model cannot use response data")
        else:
            # implicit model with q == self.data.y
            y_s = [self.data.y, x_s[-1]]
            if not self.model.implicit:
                raise OdrError("an explicit model needs response data")
            self.set_job(fit_type=1)

        if x_s[-1] != y_s[-1]:
            raise OdrError("number of observations do not match")

        n = x_s[-1]

        if len(x_s) == 2:
            m = x_s[0]
        else:
            m = 1
        if len(y_s) == 2:
            q = y_s[0]
        else:
            q = 1

        p = len(self.beta0)

        # permissible output array shapes


Review comment (suggestion):
Here's a more user-facing error message.
```suggestion
                raise OdrError("job parameter requests an implicit model,"
                               " but an explicit model was passed")
```

Code after:
        self.stpb = _conv(stpb)
        self.stpd = _conv(stpd)
        self.sclb = _conv(sclb)
        self.scld = _conv(scld)
        self.work = _conv(work)
        self.iwork = _conv(iwork)

        self.output = None

        self._check()

    def _check(self):
        """ Check the inputs for consistency, but don't bother checking things
        that the builtin function odr will check.
        """

        x_s = list(self.data.x.shape)

        if isinstance(self.data.y, np.ndarray):
            y_s = list(self.data.y.shape)
            if self.model.implicit:
                raise OdrError("an implicit model cannot use response data")
            if self.job is not None and (self.job % 10) == 1:
                raise OdrError("job parameter requests an implicit model,"
                               " but an explicit model was passed")
        else:
            # implicit model with q == self.data.y
            y_s = [self.data.y, x_s[-1]]
            if not self.model.implicit:
                raise OdrError("an explicit model needs response data")
            self.set_job(fit_type=1)

        if x_s[-1] != y_s[-1]:
            raise OdrError("number of observations do not match")

        n = x_s[-1]

        if len(x_s) == 2:
            m = x_s[0]
        else:
            m = 1
        if len(y_s) == 2:
            q = y_s[0]
        else:
            q = 1

        p = len(self.beta0)

        # permissible output array shapes

        fcn_perms = [(q, n)]