<p dir="auto">When I changed the minimize method to "trust-constr" I got the TypeError. TypeError does not appear if verbose is set to 0 or 1.</p>
<h4 dir="auto">Reproducing code example:</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cons = ({'type':'ineq','fun': lambda params: params[31]},\
        {'type':'ineq','fun': lambda params: params[-1]})  

opts = {'maxiter': 1000, 'verbose': 3, 'factorization_method': 'SVDFactorization'} 

result = scipy.optimize.minimize(func_value,params,args=(func_args), method='trust-constr', \
                      options=opts,constraints=cons)"><pre class="notranslate"><span class="pl-s1">cons</span> <span class="pl-c1">=</span> ({<span class="pl-s">'type'</span>:<span class="pl-s">'ineq'</span>,<span class="pl-s">'fun'</span>: <span class="pl-k">lambda</span> <span class="pl-s1">params</span>: <span class="pl-s1">params</span>[<span class="pl-c1">31</span>]},\
        {<span class="pl-s">'type'</span>:<span class="pl-s">'ineq'</span>,<span class="pl-s">'fun'</span>: <span class="pl-k">lambda</span> <span class="pl-s1">params</span>: <span class="pl-s1">params</span>[<span class="pl-c1">-</span><span class="pl-c1">1</span>]})  

<span class="pl-s1">opts</span> <span class="pl-c1">=</span> {<span class="pl-s">'maxiter'</span>: <span class="pl-c1">1000</span>, <span class="pl-s">'verbose'</span>: <span class="pl-c1">3</span>, <span class="pl-s">'factorization_method'</span>: <span class="pl-s">'SVDFactorization'</span>} 

<span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">optimize</span>.<span class="pl-en">minimize</span>(<span class="pl-s1">func_value</span>,<span class="pl-s1">params</span>,<span class="pl-s1">args</span><span class="pl-c1">=</span>(<span class="pl-s1">func_args</span>), <span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s">'trust-constr'</span>, \
                      <span class="pl-s1">options</span><span class="pl-c1">=</span><span class="pl-s1">opts</span>,<span class="pl-s1">constraints</span><span class="pl-c1">=</span><span class="pl-s1">cons</span>)</pre></div>
<h4 dir="auto">Error message:</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="   File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_minimize.py&quot;, line 628, in minimize return _minimize_trustregion_constr(fun, x0, args, jac, hess, hessp,

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py&quot;, line 509, in _minimize_trustregion_constr
    _, result = tr_interior_point(

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py&quot;, line 321, in tr_interior_point
    z, state = equality_constrained_sqp(

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\equality_constrained_sqp.py&quot;, line 93, in equality_constrained_sqp
    while not stop_criteria(state, x, last_iteration_failed,

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py&quot;, line 251, in stop_criteria
    if self.global_stop_criteria(state, x,

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py&quot;, line 449, in stop_criteria
    BasicReport.print_iteration(state.nit,

  File &quot;C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\report.py&quot;, line 28, in print_iteration
    print(fmt.format(*args))

TypeError: unsupported format string passed to numpy.ndarray.__format__"><pre class="notranslate">   <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_minimize.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">628</span>, <span class="pl-s1">in</span> <span class="pl-s1">minimize</span> <span class="pl-k">return</span> <span class="pl-s1">_minimize_trustregion_constr</span>(<span class="pl-s1">fun</span>, <span class="pl-s1">x0</span>, <span class="pl-s1">args</span>, <span class="pl-s1">jac</span>, <span class="pl-s1">hess</span>, <span class="pl-s1">hessp</span>,

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">509</span>, <span class="pl-s1">in</span> <span class="pl-s1">_minimize_trustregion_constr</span>
    <span class="pl-s1">_</span>, <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">tr_interior_point</span>(

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr<span class="pl-cce">\t</span>r_interior_point.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">321</span>, <span class="pl-s1">in</span> <span class="pl-s1">tr_interior_point</span>
    <span class="pl-s1">z</span>, <span class="pl-s1">state</span> <span class="pl-c1">=</span> <span class="pl-s1">equality_constrained_sqp</span>(

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\equality_constrained_sqp.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">93</span>, <span class="pl-s1">in</span> <span class="pl-s1">equality_constrained_sqp</span>
    <span class="pl-s1">while</span> <span class="pl-c1">not</span> <span class="pl-s1">stop_criteria</span>(<span class="pl-s1">state</span>, <span class="pl-s1">x</span>, <span class="pl-s1">last_iteration_failed</span>,

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr<span class="pl-cce">\t</span>r_interior_point.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">251</span>, <span class="pl-s1">in</span> <span class="pl-s1">stop_criteria</span>
    <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">global_stop_criteria</span>(<span class="pl-s1">state</span>, <span class="pl-s1">x</span>,

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">449</span>, <span class="pl-s1">in</span> <span class="pl-s1">stop_criteria</span>
    <span class="pl-v">BasicReport</span>.<span class="pl-s1">print_iteration</span>(<span class="pl-s1">state</span>.<span class="pl-s1">nit</span>,

  <span class="pl-v">File</span> <span class="pl-s">"C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_trustregion_constr<span class="pl-cce">\r</span>eport.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">28</span>, <span class="pl-s1">in</span> <span class="pl-s1">print_iteration</span>
    <span class="pl-en">print</span>(<span class="pl-s1">fmt</span>.<span class="pl-en">format</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>))

<span class="pl-v">TypeError</span>: <span class="pl-s1">unsupported</span> <span class="pl-s1">format</span> <span class="pl-s1">string</span> <span class="pl-s1">passed</span> <span class="pl-s1">to</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">ndarray</span>.<span class="pl-s1">__format__</span></pre></div>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.5.0 1.19.1 sys.version_info(major=3, minor=8, micro=3, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.5.0 1.19.1 sys.version_info(major=3, minor=8, micro=3, releaselevel='final', serial=0)
</code></pre></div>
<p dir="auto">Making the move from using an SLSQP to trust-constr and wanted to make use of the verbose option. The error does not occur with 'verbose': 0 or 1.</p>
<h4 dir="auto">Reproducing code example:</h4>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bnds = Bounds(-5,5)

opts =  {'maxiter' : 1000, 'verbose' : 2, 'factorization_method' : 'QRFactorization'}

res = minimize(lambda z: cost(z,to), x0=z0, method='trust-constr', bounds=bnds, constraints=constraints, options=opts)"><pre class="notranslate"><code class="notranslate">bnds = Bounds(-5,5)

opts =  {'maxiter' : 1000, 'verbose' : 2, 'factorization_method' : 'QRFactorization'}

res = minimize(lambda z: cost(z,to), x0=z0, method='trust-constr', bounds=bnds, constraints=constraints, options=opts)
</code></pre></div>
<h4 dir="auto">Error message:</h4>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception has occurred: TypeError
unsupported format string passed to numpy.ndarray.__format__
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\report.py&quot;, line 22, in print_iteration
    print(fmt.format(*args))
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py&quot;, line 454, in stop_criteria
    state.constr_violation)
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py&quot;, line 257, in stop_criteria
    self.tolerance):
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\equality_constrained_sqp.py&quot;, line 96, in equality_constrained_sqp
    trust_radius, penalty, cg_info):
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py&quot;, line 329, in tr_interior_point
    factorization_method, trust_lb, trust_ub, subprob.scaling)
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py&quot;, line 519, in _minimize_trustregion_constr
    factorization_method)
  File &quot;C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_minimize.py&quot;, line 612, in minimize
    callback=callback, **options)
  File &quot;F:\JackProfile\OneDrive\Python\main.py&quot;, line 294, in &lt;module&gt;
    res = minimize(lambda z: cost(z,to), x0=z0, method='trust-constr', bounds=bnds, constraints=constraints, options=opts)
  File &quot;C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py&quot;, line 85, in _run_code
    exec(code, run_globals)
  File &quot;C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py&quot;, line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File &quot;C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py&quot;, line 263, in run_path
    pkg_name=pkg_name, script_name=fname)"><pre class="notranslate"><code class="notranslate">Exception has occurred: TypeError
unsupported format string passed to numpy.ndarray.__format__
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\report.py", line 22, in print_iteration
    print(fmt.format(*args))
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py", line 454, in stop_criteria
    state.constr_violation)
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py", line 257, in stop_criteria
    self.tolerance):
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\equality_constrained_sqp.py", line 96, in equality_constrained_sqp
    trust_radius, penalty, cg_info):
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\tr_interior_point.py", line 329, in tr_interior_point
    factorization_method, trust_lb, trust_ub, subprob.scaling)
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_trustregion_constr\minimize_trustregion_constr.py", line 519, in _minimize_trustregion_constr
    factorization_method)
  File "C:\Users\Jack\AppData\Roaming\Python\Python37\site-packages\scipy\optimize\_minimize.py", line 612, in minimize
    callback=callback, **options)
  File "F:\JackProfile\OneDrive\Python\main.py", line 294, in &lt;module&gt;
    res = minimize(lambda z: cost(z,to), x0=z0, method='trust-constr', bounds=bnds, constraints=constraints, options=opts)
  File "C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "C:\Users\Jack\AppData\Local\Programs\Python\Python37-32\Lib\runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
</code></pre></div>
<h4 dir="auto">Scipy/Numpy/Python version information:</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.3.1 1.17.2 sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.3.1 1.17.2 sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
</code></pre></div>