Simplifying units in pint without changing the magnitude
<p>Working with <code>python-pint</code>, let's suppose I have a quantity defined as</p>

<pre><code>&lt;Quantity(1.0, 'gram * kilopascal / joule')&gt;
</code></pre>

<p>which is equivalent to <code>kilogram/m3</code>. Now, when I try to get that using <code>to_base_units</code> i get:</p>

<pre><code>den.to_base_units()
&lt;Quantity(1000.0, 'gram / meter ** 3')&gt;
</code></pre>

<p>which is fine, except I wished the magnitude was still 1, and the units were, instead, <code>&lt;Quantity(1.0, 'kilogram / meter ** 3')&gt;</code>, for user-friendliness purposes. Is there a way to achieve that?</p>

<p>By the way, this happens with many different units throughout my program and there's no (easy) way to know which are the correct units for it to be converted to, which prevents me from using <code>convert_to</code> method. In this case it should change from <code>1000 gram</code> to <code>kilogram</code>, for example, but in the next case it can be from <code>0.001 meter</code> to <code>1 milimeter</code> and so on.</p>

<p>I know that pint 0.7 (I'm still using 0.6) has a new system option, but I also couldn't solve it with that.</p>

<p>Cheers</p>