MCPcopy Create free account
hub / github.com/pydata/numexpr / to_hz_string

Function to_hz_string

numexpr3/cpuinfo.py:368–383  ·  view source on GitHub ↗
(ticks)

Source from the content-addressed store, hash-verified

366 return (left, right)
367
368def to_hz_string(ticks):
369 # Convert to string
370 ticks = '{0}'.format(ticks)
371
372 # Add decimal if missing
373 if '.' not in ticks:
374 ticks = '{0}.0'.format(ticks)
375
376 # Remove trailing zeros
377 ticks = ticks.rstrip('0')
378
379 # Add one trailing zero for empty right side
380 if ticks.endswith('.'):
381 ticks = '{0}0'.format(ticks)
382
383 return ticks
384
385def to_friendly_bytes(input):
386 if not input:

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…