Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.learn.linear bob.learn.linear
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.learn.linearbob.learn.linear
  • Issues
  • #5
Closed
Open
Issue created Nov 25, 2015 by André Anjos@andre.anjos💬Owner

strip_to_rank default is `False`

Created by: anjos

As it is encoded today, despite the C++ class defaults to a True value for this setting, the Python bindings override it with a default False.

The problem is on these bindings piece of code:

PyObject* strip_to_rank = Py_True;

  if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO", kwlist,
        &use_pinv, &strip_to_rank)) return -1;

  int use_pinv_ = PyObject_IsTrue(use_pinv);
  if (use_pinv_ == -1) return -1;

  int strip_to_rank_ = PyObject_IsTrue(strip_to_rank);
  if (strip_to_rank_ == -1) return -1;

  self->cxx = new bob::learn::linear::FisherLDATrainer(use_pinv_, strip_to_rank_);

If strip_to_rank is not set, it defaults to Py_None, which does not resolve to True, but False.

Assignee
Assign to
Time tracking