class_docstr: A class representing frequencies, such as n-days.
  
  Note: Use ``freq`` to construct instances of ``Freq``.
  
  We use frequency aliases from pandas over frequency names defined by numpy.
  For example, the name for minutely is either "min" or "T", while "m"
  and "M" represent monthly frequencies. In contrast numpy uses "m" for
  minutely and "M" for monthly. In addition, pandas defines some frequencies
  which do not exist in numpy, for example quarterly frequencies.
  
  However, internally we use ``numpy.datetime64`` objects and thus we must
  support numpy's frequency names as well. To do this we generally use base
  frequencies (multiple = 1), since numpy otherwise aligns timestamps for us
  which we don't want.
  
  Weekly frequency needs to be handled specially, since numpy counts the
  number of weeks since Thu Jan 1 1970 and uses Thursday and aligns the
  timestamp to Thursday. We therefore use daily frequency internally and
  align to Monday.
class_docstr_tok: ["A","class","representing","frequencies",",","such","as","n-days",".","Note",":","Use","``","freq","``","to","construct","instances","of","``","Freq","``",".","We","use","frequency","aliases","from","pandas","over","frequency","names","defined","by","numpy",".","For","example",",","the","name","for","minutely","is","either","``","min","''","or","``","T","''",",","while","``","m","''","and","``","M","''","represent","monthly","frequencies",".","In","contrast","numpy","uses","``","m","''","for","minutely","and","``","M","''","for","monthly",".","In","addition",",","pandas","defines","some","frequencies","which","do","not","exist","in","numpy",",","for","example","quarterly","frequencies",".","However",",","internally","we","use","``","numpy.datetime64","``","objects","and","thus","we","must","support","numpy","'s","frequency","names","as","well",".","To","do","this","we","generally","use","base","frequencies","(","multiple","=","1",")",",","since","numpy","otherwise","aligns","timestamps","for","us","which","we","do","n't","want",".","Weekly","frequency","needs","to","be","handled","specially",",","since","numpy","counts","the","number","of","weeks","since","Thu","Jan","1","1970","and","uses","Thursday","and","aligns","the","timestamp","to","Thursday",".","We","therefore","use","daily","frequency","internally","and","align","to","Monday","."]
code: def __str__(self) -> str:
      return _canonical_freqstr(self.n, self.name, self.suffix)
  
imports: from __future__ import annotations
  import re
  from dataclasses import dataclass
  from typing import Tuple, Optional
  import numpy
  from gluonts import maybe
label_desc: Use image node_id 11 for calling the Freq obj's underlying member method code with example usage: obj.__str__() and returns: _canonical_freqstr