nimare.utils.check_type

check_type(obj, clss, **kwargs)[source]

Check variable type and initialize if necessary.

New in version 0.0.8.

Parameters
  • obj – Object to check and initialized if necessary.

  • clss – Target class of the object.

  • kwargs – Dictionary of keyword arguments that can be used when initializing the object.

Returns

obj – Initialized version of the object.