We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
BUG: rolling_window yields unexpected results with win_type='triang'
Here's the example in the documentation, modified to have non-zero mean:

```
n = 100
ser = pandas.Series(randn(n)+10, index=pandas.date_range('1/1/2000', periods=n))
pandas.rolling_window(ser, 5, 'triang').plot()
pandas.rolling_window(ser, 5, 'boxcar').plot()
```

The rolling boxcar window is centered around 10, as expected.

The triang window is centered around 6.  That suggests that the weights in the window don't add up to 1.

Either that or my expectation of how it should work is wrong?


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `pandas/util/print_versions.py`
Content:
```
1 import os
2 import platform
3 import sys
4 import struct
5 import subprocess
6 import codecs
7 
8 
9 def get_sys_info():
10     "Returns system information as a dict"
11 
12     blob = []
13 
14     # get full commit hash
15     commit = None
16     if os.path.isdir(".git") and os.path.isdir("pandas"):
17         try:
18             pipe = subprocess.Popen('git log --format="%H" -n 1'.split(" "),
19                                     stdout=subprocess.PIPE, stderr=subprocess.PIPE)
20             so, serr = pipe.communicate()
21         except:
22             pass
23         else:
24             if pipe.returncode == 0:
25                 commit = so
26                 try:
27                     commit = so.decode('utf-8')
28                 except ValueError:
29                     pass
30                 commit = commit.strip().strip('"')
31 
32     blob.append(('commit', commit))
33 
34     try:
35         sysname, nodename, release, version, machine, processor = platform.uname(
36         )
37         blob.extend([
38             ("python", "%d.%d.%d.%s.%s" % sys.version_info[:]),
39             ("python-bits", struct.calcsize("P") * 8),
40             ("OS", "%s" % (sysname)),
41             ("OS-release", "%s" % (release)),
42             # ("Version", "%s" % (version)),
43             ("machine", "%s" % (machine)),
44             ("processor", "%s" % (processor)),
45             ("byteorder", "%s" % sys.byteorder),
46             ("LC_ALL", "%s" % os.environ.get('LC_ALL', "None")),
47             ("LANG", "%s" % os.environ.get('LANG', "None")),
48 
49         ])
50     except:
51         pass
52 
53     return blob
54 
55 
56 def show_versions(as_json=False):
57     import imp
58     sys_info = get_sys_info()
59 
60     deps = [
61         # (MODULE_NAME, f(mod) -> mod version)
62         ("pandas", lambda mod: mod.__version__),
63         ("nose", lambda mod: mod.__version__),
64         ("Cython", lambda mod: mod.__version__),
65         ("numpy", lambda mod: mod.version.version),
66         ("scipy", lambda mod: mod.version.version),
67         ("statsmodels", lambda mod: mod.__version__),
68         ("IPython", lambda mod: mod.__version__),
69         ("sphinx", lambda mod: mod.__version__),
70         ("patsy", lambda mod: mod.__version__),
71         ("scikits.timeseries", lambda mod: mod.__version__),
72         ("dateutil", lambda mod: mod.__version__),
73         ("pytz", lambda mod: mod.VERSION),
74         ("bottleneck", lambda mod: mod.__version__),
75         ("tables", lambda mod: mod.__version__),
76         ("numexpr", lambda mod: mod.__version__),
77         ("matplotlib", lambda mod: mod.__version__),
78         ("openpyxl", lambda mod: mod.__version__),
79         ("xlrd", lambda mod: mod.__VERSION__),
80         ("xlwt", lambda mod: mod.__VERSION__),
81         ("xlsxwriter", lambda mod: mod.__version__),
82         ("lxml", lambda mod: mod.etree.__version__),
83         ("bs4", lambda mod: mod.__version__),
84         ("html5lib", lambda mod: mod.__version__),
85         ("httplib2", lambda mod: mod.__version__),
86         ("apiclient", lambda mod: mod.__version__),
87         ("rpy2", lambda mod: mod.__version__),
88         ("sqlalchemy", lambda mod: mod.__version__),
89         ("pymysql", lambda mod: mod.__version__),
90         ("psycopg2", lambda mod: mod.__version__),
91     ]
92 
93     deps_blob = list()
94     for (modname, ver_f) in deps:
95         try:
96             try:
97                 mod = imp.load_module(modname, *imp.find_module(modname))
98             except (ImportError):
99                 import importlib
100                 mod = importlib.import_module(modname)
101             ver = ver_f(mod)
102             deps_blob.append((modname, ver))
103         except:
104             deps_blob.append((modname, None))
105 
106     if (as_json):
107         # 2.6-safe
108         try:
109             import json
110         except:
111             import simplejson as json
112 
113         j = dict(system=dict(sys_info), dependencies=dict(deps_blob))
114 
115         if as_json == True:
116             print(j)
117         else:
118             with codecs.open(as_json, "wb", encoding='utf8') as f:
119                 json.dump(j, f, indent=2)
120 
121     else:
122 
123         print("\nINSTALLED VERSIONS")
124         print("------------------")
125 
126         for k, stat in sys_info:
127             print("%s: %s" % (k, stat))
128 
129         print("")
130         for k, stat in deps_blob:
131             print("%s: %s" % (k, stat))
132 
133 
134 def main():
135         # optparse is 2.6-safe
136     from optparse import OptionParser
137     parser = OptionParser()
138     parser.add_option("-j", "--json", metavar="FILE", nargs=1,
139                       help="Save output as JSON into file, pass in '-' to output to stdout")
140 
141     (options, args) = parser.parse_args()
142 
143     if options.json == "-":
144         options.json = True
145 
146     show_versions(as_json=options.json)
147 
148     return 0
149 
150 if __name__ == "__main__":
151     sys.exit(main())
152
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/pandas/util/print_versions.py b/pandas/util/print_versions.py
--- a/pandas/util/print_versions.py
+++ b/pandas/util/print_versions.py
@@ -68,7 +68,6 @@
         ("IPython", lambda mod: mod.__version__),
         ("sphinx", lambda mod: mod.__version__),
         ("patsy", lambda mod: mod.__version__),
-        ("scikits.timeseries", lambda mod: mod.__version__),
         ("dateutil", lambda mod: mod.__version__),
         ("pytz", lambda mod: mod.VERSION),
         ("bottleneck", lambda mod: mod.__version__),

{"golden_diff": "diff --git a/pandas/util/print_versions.py b/pandas/util/print_versions.py\n--- a/pandas/util/print_versions.py\n+++ b/pandas/util/print_versions.py\n@@ -68,7 +68,6 @@\n         (\"IPython\", lambda mod: mod.__version__),\n         (\"sphinx\", lambda mod: mod.__version__),\n         (\"patsy\", lambda mod: mod.__version__),\n-        (\"scikits.timeseries\", lambda mod: mod.__version__),\n         (\"dateutil\", lambda mod: mod.__version__),\n         (\"pytz\", lambda mod: mod.VERSION),\n         (\"bottleneck\", lambda mod: mod.__version__),\n", "issue": "BUG: rolling_window yields unexpected results with win_type='triang'\nHere's the example in the documentation, modified to have non-zero mean:\n\n```\nn = 100\nser = pandas.Series(randn(n)+10, index=pandas.date_range('1/1/2000', periods=n))\npandas.rolling_window(ser, 5, 'triang').plot()\npandas.rolling_window(ser, 5, 'boxcar').plot()\n```\n\nThe rolling boxcar window is centered around 10, as expected.\n\nThe triang window is centered around 6.  That suggests that the weights in the window don't add up to 1.\n\nEither that or my expectation of how it should work is wrong?\n\n", "before_files": [{"content": "import os\nimport platform\nimport sys\nimport struct\nimport subprocess\nimport codecs\n\n\ndef get_sys_info():\n    \"Returns system information as a dict\"\n\n    blob = []\n\n    # get full commit hash\n    commit = None\n    if os.path.isdir(\".git\") and os.path.isdir(\"pandas\"):\n        try:\n            pipe = subprocess.Popen('git log --format=\"%H\" -n 1'.split(\" \"),\n                                    stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            so, serr = pipe.communicate()\n        except:\n            pass\n        else:\n            if pipe.returncode == 0:\n                commit = so\n                try:\n                    commit = so.decode('utf-8')\n                except ValueError:\n                    pass\n                commit = commit.strip().strip('\"')\n\n    blob.append(('commit', commit))\n\n    try:\n        sysname, nodename, release, version, machine, processor = platform.uname(\n        )\n        blob.extend([\n            (\"python\", \"%d.%d.%d.%s.%s\" % sys.version_info[:]),\n            (\"python-bits\", struct.calcsize(\"P\") * 8),\n            (\"OS\", \"%s\" % (sysname)),\n            (\"OS-release\", \"%s\" % (release)),\n            # (\"Version\", \"%s\" % (version)),\n            (\"machine\", \"%s\" % (machine)),\n            (\"processor\", \"%s\" % (processor)),\n            (\"byteorder\", \"%s\" % sys.byteorder),\n            (\"LC_ALL\", \"%s\" % os.environ.get('LC_ALL', \"None\")),\n            (\"LANG\", \"%s\" % os.environ.get('LANG', \"None\")),\n\n        ])\n    except:\n        pass\n\n    return blob\n\n\ndef show_versions(as_json=False):\n    import imp\n    sys_info = get_sys_info()\n\n    deps = [\n        # (MODULE_NAME, f(mod) -> mod version)\n        (\"pandas\", lambda mod: mod.__version__),\n        (\"nose\", lambda mod: mod.__version__),\n        (\"Cython\", lambda mod: mod.__version__),\n        (\"numpy\", lambda mod: mod.version.version),\n        (\"scipy\", lambda mod: mod.version.version),\n        (\"statsmodels\", lambda mod: mod.__version__),\n        (\"IPython\", lambda mod: mod.__version__),\n        (\"sphinx\", lambda mod: mod.__version__),\n        (\"patsy\", lambda mod: mod.__version__),\n        (\"scikits.timeseries\", lambda mod: mod.__version__),\n        (\"dateutil\", lambda mod: mod.__version__),\n        (\"pytz\", lambda mod: mod.VERSION),\n        (\"bottleneck\", lambda mod: mod.__version__),\n        (\"tables\", lambda mod: mod.__version__),\n        (\"numexpr\", lambda mod: mod.__version__),\n        (\"matplotlib\", lambda mod: mod.__version__),\n        (\"openpyxl\", lambda mod: mod.__version__),\n        (\"xlrd\", lambda mod: mod.__VERSION__),\n        (\"xlwt\", lambda mod: mod.__VERSION__),\n        (\"xlsxwriter\", lambda mod: mod.__version__),\n        (\"lxml\", lambda mod: mod.etree.__version__),\n        (\"bs4\", lambda mod: mod.__version__),\n        (\"html5lib\", lambda mod: mod.__version__),\n        (\"httplib2\", lambda mod: mod.__version__),\n        (\"apiclient\", lambda mod: mod.__version__),\n        (\"rpy2\", lambda mod: mod.__version__),\n        (\"sqlalchemy\", lambda mod: mod.__version__),\n        (\"pymysql\", lambda mod: mod.__version__),\n        (\"psycopg2\", lambda mod: mod.__version__),\n    ]\n\n    deps_blob = list()\n    for (modname, ver_f) in deps:\n        try:\n            try:\n                mod = imp.load_module(modname, *imp.find_module(modname))\n            except (ImportError):\n                import importlib\n                mod = importlib.import_module(modname)\n            ver = ver_f(mod)\n            deps_blob.append((modname, ver))\n        except:\n            deps_blob.append((modname, None))\n\n    if (as_json):\n        # 2.6-safe\n        try:\n            import json\n        except:\n            import simplejson as json\n\n        j = dict(system=dict(sys_info), dependencies=dict(deps_blob))\n\n        if as_json == True:\n            print(j)\n        else:\n            with codecs.open(as_json, \"wb\", encoding='utf8') as f:\n                json.dump(j, f, indent=2)\n\n    else:\n\n        print(\"\\nINSTALLED VERSIONS\")\n        print(\"------------------\")\n\n        for k, stat in sys_info:\n            print(\"%s: %s\" % (k, stat))\n\n        print(\"\")\n        for k, stat in deps_blob:\n            print(\"%s: %s\" % (k, stat))\n\n\ndef main():\n        # optparse is 2.6-safe\n    from optparse import OptionParser\n    parser = OptionParser()\n    parser.add_option(\"-j\", \"--json\", metavar=\"FILE\", nargs=1,\n                      help=\"Save output as JSON into file, pass in '-' to output to stdout\")\n\n    (options, args) = parser.parse_args()\n\n    if options.json == \"-\":\n        options.json = True\n\n    show_versions(as_json=options.json)\n\n    return 0\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n", "path": "pandas/util/print_versions.py"}], "after_files": [{"content": "import os\nimport platform\nimport sys\nimport struct\nimport subprocess\nimport codecs\n\n\ndef get_sys_info():\n    \"Returns system information as a dict\"\n\n    blob = []\n\n    # get full commit hash\n    commit = None\n    if os.path.isdir(\".git\") and os.path.isdir(\"pandas\"):\n        try:\n            pipe = subprocess.Popen('git log --format=\"%H\" -n 1'.split(\" \"),\n                                    stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n            so, serr = pipe.communicate()\n        except:\n            pass\n        else:\n            if pipe.returncode == 0:\n                commit = so\n                try:\n                    commit = so.decode('utf-8')\n                except ValueError:\n                    pass\n                commit = commit.strip().strip('\"')\n\n    blob.append(('commit', commit))\n\n    try:\n        sysname, nodename, release, version, machine, processor = platform.uname(\n        )\n        blob.extend([\n            (\"python\", \"%d.%d.%d.%s.%s\" % sys.version_info[:]),\n            (\"python-bits\", struct.calcsize(\"P\") * 8),\n            (\"OS\", \"%s\" % (sysname)),\n            (\"OS-release\", \"%s\" % (release)),\n            # (\"Version\", \"%s\" % (version)),\n            (\"machine\", \"%s\" % (machine)),\n            (\"processor\", \"%s\" % (processor)),\n            (\"byteorder\", \"%s\" % sys.byteorder),\n            (\"LC_ALL\", \"%s\" % os.environ.get('LC_ALL', \"None\")),\n            (\"LANG\", \"%s\" % os.environ.get('LANG', \"None\")),\n\n        ])\n    except:\n        pass\n\n    return blob\n\n\ndef show_versions(as_json=False):\n    import imp\n    sys_info = get_sys_info()\n\n    deps = [\n        # (MODULE_NAME, f(mod) -> mod version)\n        (\"pandas\", lambda mod: mod.__version__),\n        (\"nose\", lambda mod: mod.__version__),\n        (\"Cython\", lambda mod: mod.__version__),\n        (\"numpy\", lambda mod: mod.version.version),\n        (\"scipy\", lambda mod: mod.version.version),\n        (\"statsmodels\", lambda mod: mod.__version__),\n        (\"IPython\", lambda mod: mod.__version__),\n        (\"sphinx\", lambda mod: mod.__version__),\n        (\"patsy\", lambda mod: mod.__version__),\n        (\"dateutil\", lambda mod: mod.__version__),\n        (\"pytz\", lambda mod: mod.VERSION),\n        (\"bottleneck\", lambda mod: mod.__version__),\n        (\"tables\", lambda mod: mod.__version__),\n        (\"numexpr\", lambda mod: mod.__version__),\n        (\"matplotlib\", lambda mod: mod.__version__),\n        (\"openpyxl\", lambda mod: mod.__version__),\n        (\"xlrd\", lambda mod: mod.__VERSION__),\n        (\"xlwt\", lambda mod: mod.__VERSION__),\n        (\"xlsxwriter\", lambda mod: mod.__version__),\n        (\"lxml\", lambda mod: mod.etree.__version__),\n        (\"bs4\", lambda mod: mod.__version__),\n        (\"html5lib\", lambda mod: mod.__version__),\n        (\"httplib2\", lambda mod: mod.__version__),\n        (\"apiclient\", lambda mod: mod.__version__),\n        (\"rpy2\", lambda mod: mod.__version__),\n        (\"sqlalchemy\", lambda mod: mod.__version__),\n        (\"pymysql\", lambda mod: mod.__version__),\n        (\"psycopg2\", lambda mod: mod.__version__),\n    ]\n\n    deps_blob = list()\n    for (modname, ver_f) in deps:\n        try:\n            try:\n                mod = imp.load_module(modname, *imp.find_module(modname))\n            except (ImportError):\n                import importlib\n                mod = importlib.import_module(modname)\n            ver = ver_f(mod)\n            deps_blob.append((modname, ver))\n        except:\n            deps_blob.append((modname, None))\n\n    if (as_json):\n        # 2.6-safe\n        try:\n            import json\n        except:\n            import simplejson as json\n\n        j = dict(system=dict(sys_info), dependencies=dict(deps_blob))\n\n        if as_json == True:\n            print(j)\n        else:\n            with codecs.open(as_json, \"wb\", encoding='utf8') as f:\n                json.dump(j, f, indent=2)\n\n    else:\n\n        print(\"\\nINSTALLED VERSIONS\")\n        print(\"------------------\")\n\n        for k, stat in sys_info:\n            print(\"%s: %s\" % (k, stat))\n\n        print(\"\")\n        for k, stat in deps_blob:\n            print(\"%s: %s\" % (k, stat))\n\n\ndef main():\n        # optparse is 2.6-safe\n    from optparse import OptionParser\n    parser = OptionParser()\n    parser.add_option(\"-j\", \"--json\", metavar=\"FILE\", nargs=1,\n                      help=\"Save output as JSON into file, pass in '-' to output to stdout\")\n\n    (options, args) = parser.parse_args()\n\n    if options.json == \"-\":\n        options.json = True\n\n    show_versions(as_json=options.json)\n\n    return 0\n\nif __name__ == \"__main__\":\n    sys.exit(main())\n", "path": "pandas/util/print_versions.py"}]}